Developing Web 2.0 applications
with JavaServerFaces
and Dreamweaver
>> Just Became Easier
Documentation
Search
  1. Introduction
  2. Getting Started
  3. Trinidad Concepts
  4. Code View Support
  5. Design View Support
  6. Tag Object Toolbars
  7. Trinidad Server Behaviors
  8. Trinidad Property Inspectors
  9. Trinidad Tag Reference
Trinidad Core Tag Library
  tr:attribute
  tr:breadCrumbs
  tr:chart
  tr:chooseColor
  tr:chooseDate
  tr:column
  tr:commandButton
  tr:commandLink
  tr:commandNavigationItem
  tr:componentDef
  tr:componentRef
  tr:convertColor
  tr:convertDateTime
Selected tr:convertNumber
  tr:document
  tr:facetRef
  tr:forEach
  tr:form
  tr:goButton
  tr:goLink
  tr:group
  tr:icon
  tr:image
  tr:importScript
  tr:inputColor
  tr:inputDate
  tr:inputFile
  tr:inputHidden
  tr:inputListOfValues
  tr:inputNumberSpinbox
  tr:inputText
  tr:iterator
  tr:legend
  tr:media
  tr:message
  tr:messages
  tr:navigationPane
  tr:navigationTree
  tr:outputDocument
  tr:outputFormatted
  tr:outputLabel
  tr:outputText
  tr:page
  tr:panelAccordion
  tr:panelBorderLayout
  tr:panelBox
  tr:panelButtonBar
  tr:panelChoice
  tr:panelFormLayout
  tr:panelGroupLayout
  tr:panelHeader
  tr:panelHorizontalLayout
  tr:panelLabelAndMessage
  tr:panelList
  tr:panelPage
  tr:panelPageHeader
  tr:panelPartialRoot
  tr:panelRadio
  tr:panelSideBar
  tr:panelTabbed
  tr:panelTip
  tr:poll
  tr:processChoiceBar
  tr:progressIndicator
  tr:resetActionListener
  tr:resetButton
  tr:returnActionListener
  tr:selectBooleanCheckbox
  tr:selectBooleanRadio
  tr:selectItem
  tr:selectManyCheckbox
  tr:selectManyListbox
  tr:selectManyShuttle
  tr:selectOneChoice
  tr:selectOneListbox
  tr:selectOneRadio
  tr:selectOrderShuttle
  tr:selectRangeChoiceBar
  tr:separator
  tr:setActionListener
  tr:showDetail
  tr:showDetailHeader
  tr:showDetailItem
  tr:singleStepButtonBar
  tr:spacer
  tr:subform
  tr:switcher
  tr:table
  tr:train
  tr:tree
  tr:treeTable
  tr:validateByteLength
  tr:validateDateRestriction
  tr:validateDateTimeRange
  tr:validateDoubleRange
  tr:validateLength
  tr:validateLongRange
  tr:validateRegExp
  tr:validator
If you like this documentation, please take a look at my book:

9. Trinidad Core Tag Reference

Documentation > Trinidad > Trinidad Tag Reference > Trinidad Core Tag Library > tr:convertNumber

tr:convertNumber

<p>The <tr:convertNumber> tag is used to convert a string to a number object and back to a string based on pattern or type.</p>

Example

<tr:convertNumber> </tr:convertNumber> 

HTML Output

(No output.)

Tag Attributes

currencyCode Text
 
The ISO 4217 currency code, applied only when formatting currencies. Currency code can also be set for the entire application in trinidad-config.xml file. If currency code is not set on the converter, and if set on trinidad-config.xml configuration file it will be used by calling RequestContext().getCurrenctInstance().getCurrencyCode(). This currency code will be used during call to getAsString() for formatting, provided type is set to 'currency'.
currencySymbol Text
 
Currency symbol, is applied only when formatting currencies. If currency code is set then symbol will be ignored.
groupingUsed Text
 
Flag specifying whether formatted output will contain grouping separators. Default value is true.
id Text
 
the identifier for the component
integerOnly Text
 
Flag specifying whether only the integer part of the value will be formatted and parsed. Default value is false.
locale Text
 
Locale whose predefined styles for numbers are used during formatting and parsing. If not specified, the Locale returned by FacesContext.getViewRoot().getLocale() will be used.
maxFractionDigits Text
 
Maximum number of digits that will be formatted in the fractional portion of the output.
maxIntegerDigits Text
 
Maximum number of digits that will be formatted in the integer portion of the output.
messageDetailConvertCurrency Text
 
Custom error message to be used, for creating detail part of the FacesMessage, when value cannot be converted to a number, when type is set to 'currency' and pattern is null or not set. </p> <p> Parameters:<ul><li> {0} the label that identifies the component </li><li> {1} value entered by the user </li></ul>
messageDetailConvertNumber Text
 
Custom error message to be used, for creating detail part of the FacesMessage, when value cannot be converted to a number, when type is set to 'number' and pattern is null or not set. </p> <p> Parameters:<ul><li> {0} the label that identifies the component </li><li> {1} value entered by the user </li></ul>
messageDetailConvertPattern Text
 
Custom error message to be used, for creating detail part of the FacesMessage message, when value cannot be converted to a number, based on the pattern set. </p> <p> Parameters:<ul><li> {0} the label that identifies the component </li><li> {1} value entered by the user </li><li> {2} the specified conversion pattern </li></ul>
messageDetailConvertPercent Text
 
Custom error message to be used, for creating detail part of the FacesMessage, when value cannot be converted to a number, when type is set to 'percent' and pattern is null or not set. </p> <p> Parameters:<ul><li> {0} the label that identifies the component </li><li> {1} value entered by the user </li></ul>
minFractionDigits Text
 
Minimum number of digits that will be formatted in the fractional portion of the output.
minIntegerDigits Text
 
Minimum number of digits that will be formatted in the integer portion of the output.
pattern Text
 
Custom formatting pattern which determins how the number string should be formatted and parsed.
type Text
 
Specifies how the number string will be formatted and parsed. Valid values are "number", "currency", and "percent". Default value is "number".