Tag name: <amc:convertNumber>
type: oracle.adf.rich.Number
This is an extension of the standard JSF javax.faces.convert.NumberConverter The converter provides all the standard functionality of the default NumberConverter and is strict while converting to object.
JSF javax.faces.convert.NumberConverter will convert values like 22.22.2 or 22ABC to valid Number 22.22 and 22 respectively. Here it would result in a conversion failure and would throw a ConverterException.
If number grouping separator, decimal separator
is configured in adf-faces-config.xml
file,
it will be used during call to getAsObject()
and
getAsString()
for parsing and formatting. If it has not been set,
number grouping separator, decimal separator
is
defaulted based on the locale.
If currencyCode
is set on the converter then it will be used.
Else uses the currencyCode
set in adf-faces-config.xml
file. If it is not set in the configuration file then it is defaulted based on the locale.
Since ADF Faces is compatible with JDK 1.4 and higher versions,
the currencyCode
gets preference over currencySymbol.
See JSF's javax.faces.convert.NumberConverter for the way in which
currencyCode
and currencySymbol
gets preference for
different version of JDK.
This converter is automatically registered under the standard
converter ID, and therefore will be used when the
<f:convertNumber>
tag is used.
This converter also runs on the client (implements org.apache.myfaces.trinidad.convert.ClientConverter).
One exception: If the pattern
attribute is specified, the converter will run on the server.
For more information see javadoc for
org.apache.myfaces.trinidad.convert.NumberConverter
<amc:inputText id="mdf5" value="0.75" label="Score"> <amc:convertNumber type="percent" locale="en-US" /> </amc:inputText>
Name | Type | Supports EL? | Description |
---|---|---|---|
currencyCode | String | Yes | Specifies the ISO 4217 currency code, and is only applied when formatting currencies. |
currencySymbol | String | Yes | Specifies the currency symbol, and is only applied when formatting currencies. If the currencyCode attribute is set, then currencySymbol will be ignored. |
groupingUsed | boolean | Yes | Specifies whether or not the formatted output will contain grouping separators. The default value is true. |
integerOnly | boolean | Yes | Specifies whether or not only the integer part of the value will be formatted and parsed. Default value is false. |
maxFractionDigits | int | Yes | Specifies the maximum number of digits that will be formatted in the fractional portion of the output. |
maxIntegerDigits | int | Yes | Specifies the maximum number of digits that will be formatted in the integer portion of the output. |
minFractionDigits | int | Yes | Specifies the minimum number of digits that will be formatted in the fractional portion of the output. |
minIntegerDigits | int | Yes | Specifies the minimum number of digits that will be formatted in the integer portion of the output. |
pattern | String | Yes | Specifies a custom formatting pattern that determines how the number string should be formatted and parsed. Valid values are those supported by java.text.DecimalFormat. |
type | String | Yes |
Specifies how the number string will be formatted and parsed. Valid values:
|