Class NumberConverter

  • All Implemented Interfaces:
    PartialStateHolder, StateHolder, Converter

    @JSFConverter(name="f:convertNumber",
                  bodyContent="empty")
    @JSFJspProperty(name="binding",
                    returnType="jakarta.faces.convert.NumberConverter",
                    longDesc="A ValueExpression that evaluates to a NumberConverter.")
    public class NumberConverter
    extends Object
    implements Converter, PartialStateHolder
    This tag creates a number formatting converter and associates it with the nearest parent UIComponent. Unless otherwise specified, all attributes accept static values or EL expressions. see Javadoc of Faces Specification
    • Constructor Detail

      • NumberConverter

        public NumberConverter()
    • Method Detail

      • getCurrencyCode

        @JSFProperty
        public String getCurrencyCode()
        ISO 4217 currency code
      • setCurrencyCode

        public void setCurrencyCode​(String currencyCode)
      • getCurrencySymbol

        @JSFProperty
        public String getCurrencySymbol()
        The currency symbol used to format a currency value. Defaults to the currency symbol for locale.
      • setCurrencySymbol

        public void setCurrencySymbol​(String currencySymbol)
      • isGroupingUsed

        @JSFProperty(deferredValueType="java.lang.Boolean")
        public boolean isGroupingUsed()
        Specifies whether output will contain grouping separators. Default: true.
      • setGroupingUsed

        public void setGroupingUsed​(boolean groupingUsed)
      • isIntegerOnly

        @JSFProperty(deferredValueType="java.lang.Boolean")
        public boolean isIntegerOnly()
        Specifies whether only the integer part of the input will be parsed. Default: false.
      • setIntegerOnly

        public void setIntegerOnly​(boolean integerOnly)
      • getLocale

        @JSFProperty(deferredValueType="java.lang.Object")
        public Locale getLocale()
        The name of the locale to be used, instead of the default as specified in the faces configuration file.
      • setLocale

        public void setLocale​(Locale locale)
      • getMaxFractionDigits

        @JSFProperty(deferredValueType="java.lang.Integer")
        public int getMaxFractionDigits()
        The maximum number of digits in the fractional portion of the number.
      • setMaxFractionDigits

        public void setMaxFractionDigits​(int maxFractionDigits)
      • getMaxIntegerDigits

        @JSFProperty(deferredValueType="java.lang.Integer")
        public int getMaxIntegerDigits()
        The maximum number of digits in the integer portion of the number.
      • setMaxIntegerDigits

        public void setMaxIntegerDigits​(int maxIntegerDigits)
      • getMinFractionDigits

        @JSFProperty(deferredValueType="java.lang.Integer")
        public int getMinFractionDigits()
        The minimum number of digits in the fractional portion of the number.
      • setMinFractionDigits

        public void setMinFractionDigits​(int minFractionDigits)
      • getMinIntegerDigits

        @JSFProperty(deferredValueType="java.lang.Integer")
        public int getMinIntegerDigits()
        The minimum number of digits in the integer portion of the number.
      • setMinIntegerDigits

        public void setMinIntegerDigits​(int minIntegerDigits)
      • getPattern

        @JSFProperty
        public String getPattern()
        A custom Date formatting pattern, in the format used by java.text.SimpleDateFormat.
      • setPattern

        public void setPattern​(String pattern)
      • setTransient

        public void setTransient​(boolean aTransient)
        Specified by:
        setTransient in interface StateHolder
      • getType

        @JSFProperty
        public String getType()
        The type of formatting/parsing to be performed. Values include: number, currency, and percent. Default: number.
      • setType

        public void setType​(String type)