dWebSpec Dictionary
CONTEXT: descriptors->element->conversion-type




All Details Standard Only Platform Only
Structured Web info and helpTechnologies
 Home Page
 Product Page
 Download Page
 Feedback
Javascript Tree Menu

Results for:

 element.conversion-type 
Prev  Topic  Next

The standard html entries are presented as strings on the page. However, their values could be bound to other types of objects and primitives. These could be numeric, date or other types. The conversion type specification allows for the designation of such types. The dWebSpec standard types are listed below:

  • string (default)
  • byte
  • short
  • integer
  • long
  • float
  • double
  • date
  • collections

The standard types would ensure platform independence. However, if such independence is not needed, or else as specification matures, platform specific or custom types could or should be included.

 JSF  

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 TypesJSF ComponentsJava 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
Prev Next