myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schaal, Roland" <>
Subject Unexpected behavior of NumberConverter
Date Wed, 08 Nov 2006 08:57:39 GMT
I have an input component which uses the f:convertNumber tag to convert
the input to a Number object.
When I type the value "x12345" it gives me a ConversionError as
But when I type the value "123x45" there is no ConversionError but it
converts this input to the Number "123" and cuts the rest of it. I would
also expect a ConversionError as this input is not a valid Number...?!
Can anyone confirm this to be a bug of the NumberConverter?
Looking into the source of NumberConverter I see that it uses
DecimalFormat to parse the input into Number which definitive cuts the
String value in the descibed way. Maybe there should also be a
verification for any character of the typed input string.
What do others think?

View raw message