| Author |
<f:converter> tags
|
Mee Kar Suu
Greenhorn
Joined: Dec 25, 2011
Posts: 11
|
|
How to convert class java.lang.Integer 10,005 of type to interface javax.faces.convert.Converter?
java.lang.String is ok and int type is not,I don't know why?
Please help me.Actually,I want to get comma format of integer.
thanks.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 12513
|
|
HTML is text and nothing but text. The JSF converters are simple pairs of methods designed to translate objects from their server-internal (binary) forms to text and back again.
Number formatting applies only to text representation of numbers. There is no such thing as a java.lang.Integer(10,005), because the digit separator (comma) isn't an attribute of Integers, it's a way of formatting the Integer for display purposes, and that process is not part of actual Integer itself, it's a transformation that uses an Integer as input.
Reading a number with digit separators and converting it to an Integer is going the other direction, and the opposite of "format" is "parse". The Java NumberFormat converters that come as part of the basic JVM package handle both formatting and parsing.
|
One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
|
 |
Mee Kar Suu
Greenhorn
Joined: Dec 25, 2011
Posts: 11
|
|
Dear Tim,
Thanks for your answer.
I already finished this problem yesterday.
Anyway thanks,
Mee
|
 |
 |
|
|
subject: <f:converter> tags
|
|
|