| |
|
|
|
 |
Home NewsBlogProducts Download Buy Now Documentation Support |
 |
 |
|
|
 |
| |

Contents
|
10. Trinidad Core Tag Reference
Contents > Trinidad Core Tag Reference > tr:convertNumber
tr:convertNumber |
|
The tr:convertNumber tag is used to convert a string to a number object and back to a string based on pattern or type.
Example
<tr:convertNumber></tr:convertNumber>
HTML Output
(No output.)
|
Tag Attributes
| currencyCode |
Text |
| |
| The currencyCode attribute sets the ISO 4217 currency code. The currency code can also be set in trinidad-config.xml and accessed with RequestContext().getCurrenctInstance().getCurrencyCode(). |
| currencySymbol |
Text |
| |
| The currencySymbol attribute sets the currency symbol which is used when formatting currencies. This attribute is only used when the currencyCode attribute is not set. |
| groupingUsed |
Boolean |
| |
| The groupingUsed attribute determines if formatted output will contain grouping separators. The default is "true". |
| id |
Text |
| |
| The unique identifier value for this component. The value must be unique within the closest naming container. |
| integerOnly |
Boolean |
| |
| The integerOnly attribute determines if only the integer part of the value is formatted. Default is "false". |
| locale |
Enumerated |
| |
| The locale attribute sets the language, country, and variant for formatting locale-sensitive data such as numbers and dates. If not specified, the Locale returned by FacesContext.getViewRoot().getLocale() will be used. Valid expressions must evaluate to a java.util.Locale. |
| maxFractionDigits |
Text |
| |
| The maxFractionDigits attribute sets the maximum number of digits to be formatted in the fractional part of the number. |
| maxIntegerDigits |
Text |
| |
| The maxIntegerDigits attribute sets the maximum number of digits to be formatted in the integer part of the number. |
| messageDetailConvertCurrency |
Text |
| |
| The messageDetailConvertCurrency attribute sets the custom error message with the parameters {0} for a label to identify the component, {1} for the value from the user, when the value cannot be converted, the type attribute is "currency" and the pattern attribute is not set or null. |
| messageDetailConvertNumber |
Text |
| |
| The messageDetailConvertNumber attribute sets the custom error message with the parameters {0} for a label to identify the component, {1} for the value from the user, when the value cannot be converted, the type attribute is "number" and the pattern attribute is not set or null. |
| messageDetailConvertPattern |
Text |
| |
| The messageDetailConvertPattern attribute sets the custom error message with the parameters {0} for a label to identify the component, {1} for the value from the user, and {2} for the pattern when the value cannot be converted, based on the pattern. |
| messageDetailConvertPercent |
Text |
| |
| The messageDetailConvertPercent attribute sets the custom error message with the parameters {0} for a label to identify the component, {1} for the value from the user, when the value cannot be converted, the type attribute is "percent" and the pattern attribute is not set or null. |
| minFractionDigits |
Text |
| |
| The minFractionDigits attribute sets the minimum number of digits to be formatted in the fractional part of the number. |
| minIntegerDigits |
Text |
| |
| The minIntegerDigits attribute sets the minimum number of digits to be formatted in the integer part of the number. |
| pattern |
Text |
| |
| The pattern attribute sets the pattern for formatting. |
| type |
Enumerated |
| |
| The type attribute set the type of formatting. Valid values are "number", "currency", and "percent". The default is "number". |
|
|
|
| |
|