|
This corresponds to JSF component attribute converter.
One way of implementing this is to specify a method-binding expression that would set a method within the backing bean as the converter for the component. In the alternate, a converter identifier could be designated. (This involves classes that subscribe to converter interface, that are registered with keys in the configuration file. Such keys could then be referenced here.)
Apart from designating a converter as an attribute, they could be in form of components that are nested within other components, in order to depict an associated converter.
There are 2 standard components for converters:
f:converterDateTime
f:converterNumber
Converters could also be registered with their identifier using the f:converter component.
The table below shows dWebSpec standard conversion-types and their correspondent converters on the JSF platform.
| Standard Types | JSF Components | Java Types |
| string (default) | | String |
| byte | f:converterNumber cater to all the integer derived types, by specifying integerOnly = true
The delineation of byte, integer and long types could be approximated with the maxIntegerDigits and
minIntegerDigits settings | byte |
| short | short |
| integer | int |
| long | long |
| float | f:converterNumber cater to all the float derived types, with the absence of specifying integerOnly = true (default is false)
The delineation of float or double types could be approximated with the maxFractionDigits and
minFractionDigits settings | float |
| double | double |
| date | f:convertDateTime | Date |
| boolean | | boolean |
Custom converters could be registered and used on the page with the following tag. The registration aspects is
discussed under the subject of behavior-define descriptor:
f:converter
|