I use:
<h:inputText id="costsPerPallet" value="#{globalReportSelectionForm.palletCost}" size="5">
<f:convertNumber pattern="0.00"/>
</h:inputText>
palletCost is a Double;
When entering a value of "1.00" and submit it is fine. When I enter "1" and submit I get the error:
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Double
What is a good way to put "1.00" before the submit. In the onblur javascript function? Or is there a better way?