下面是两篇文档
http://www.ibm.com/developerworks/java/library/j-jsf3/
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.jsf_apps%7Ceventvalidate%7Csf_avc_converters~html/
The rest of the built-in converters do not have their own tags. These standard converters are registered in JSF for a specific data type:
Type | Class | Name | For conversion between... |
---|---|---|---|
BigDecimal | BigDecimalConverter | javax.faces.BigDecimal | String and java.math.BigDecimal values |
BigInteger | BigIntegerConverter | javax.faces.BigInteger | String and java.math.BigInteger values |
Boolean and boolean | BooleanConverter | javax.faces.Boolean | String and java.lang.Boolean (and boolean primitive) values |
Byte and byte | ByteConverter | javax.faces.Byte | String and java.lang.Number values |
Character and char | CharacterConverter | javax.faces.Character | String and java.lang.Character (and char primitive) values |
Double and double | DoubleConverter | javax.faces.Double | String and java.lang.Double (and double primitive) values |
Float and float | FloatConverter | javax.faces.Float | String and java.lang.Float (and float primitive) values |
Integer and int | IntegerConverter | javax.faces.Integer | String and java.lang.Integer (and int primitive) values |
Long and long | LongConverter | javax.faces.Long | String and java.lang.Long (and long primitive) values |
Short and short | ShortConverter | javax.faces.Short | String and java.lang.Short (and short primitive) values |
You can use standard converters that do not have supplied tags in one of three ways:
- Specify the
converter
attribute on a component using a fully qualified class name or a converter name. - Nest the
f:converter
tag within a component. Use this tag'sconverterId
attribute to reference the converter's name.