jump to navigation

JSF, Float, and f:convertNumber February 16, 2010

Posted by Phill in Frameworks, Presentation Layer.
Tags: , , ,
comments closed

I’ve been having some fun issues with JSF and converting Float issues. Essentially the problem occured when converting a primitive float type to a java.lang.Float type in my value object (I was trying to updating a float value from an inputText field). I kept getting errors like:

java.lang.IllegalArgumentException: argument type mismatch

Anyway, I found an answer which seems to work, but rather than post it directly here I’ll simply link to the original question on StackOverflow (in case someone posts a better answer subsequently!).

These kind of issues are one of the many reasons why JSF has gone down in my estimation… it’s not a bad framework, it just seems to make what should be simple things massively complicated! That said, JSF 2.0 looks good, so maybe it will solve these kind of issues.

Advertisements