Tuesday, December 25, 2012

ADF InputText number conversion

To format the numbers in the ADF InputText, use the below code inside <af:inputText> </af:inputText>


<af:convertNumber type="number" minFractionDigits="0"
                            maxIntegerDigits="4" maxFractionDigits="2"
                            messageDetailConvertNumber="Invalid Number"
                            pattern="#.#" />

The example final code is :



 <af:inputText value="#{bindings.Gireesh.inputValue}" label="#{bindings.Gireesh.hints.label}"
                      required="#{bindings.Gireesh.hints.mandatory}" columns="#{bindings.Gireesh.hints.displayWidth}"
                      maximumLength="#{bindings.Gireesh.hints.precision}" shortDesc="#{bindings.Gireesh.hints.tooltip}"
                      id="it3" disabled="true" binding="#{expense.gireesh}">
                      <af:convertNumber type="number" minFractionDigits="0"
                            maxIntegerDigits="4" maxFractionDigits="2"
                            messageDetailConvertNumber="Invalid Number"
                            pattern="#.#" />
          <f:validator binding="#{bindings.Gireesh.validator}"/>
        </af:inputText>


No comments:

Post a Comment