This content has been marked as final. Show 2 replies
finally...after struggling for days i got the answer...
it's nothing about seam
it's only jsf
1. According to JSF specification, if you use f:convertNumber, the type of the result depends on the input: if the user enters 0 you will get a Long, if he enters 0.1 you'll get a Double, no matter what you have on your bean. So the correct way to work with f:convertNumber (no matter what other attributes you use, like pattern, or so) is to use a Number on the backing bean, not Integer, or int, or float, or Float, or Double or anything like that.
2. If you use f:convert id="javax.faces.Double" or the converter attribute in the input controls you will always get a Double, but then you cannot specify any formatting.
so usinger Number solved my problem
Thank you Sasha for your investigation!!
I had the same problem and your post helped me!!
Thanks a lot!!