# com.bea.wlw.netui.tags.html
FormatNumber Class

public class FormatNumber
extends `FormatTag`

A formatter used to format numbers. This formatter uses patterns that conform to `java.text.NumberFormat` pattern syntax. FormatNumber calls `toString()` on the object to be formatted to get the value the pattern is applied to. The valid FormatNumber types are:

- number
- currency
- percent

Attribute Descriptions
Attribute | Required | Runtime Expression Evaluation | Data Bindable
--- | --- | --- | ---
country | No | No | No
The country code used to determine the locale.
language | No | No | No
The language code used to determine the locale.
pattern | No | No | Read Only
The NumberFormat pattern used to format this number.
type | No | No | No
The type of the format to apply (number, currency, or percent).

Related Topics

<netui:format...> Tag Samples
``FormatDate``
``FormatString``
``NumberFormat``

Hierarchy
  `Object`
  `TagSupport`
  `BodyTagSupport`
  `AbstractBaseTag`
  `FormatTag`
  `FormatNumber`

All Implemented Interfaces
  `BodyTag`, `IterationTag`, `Serializable`, `Tag`

## Field Summary

`protected `String`` | `type` The type of number format to be used.

Fields from com.bea.wlw.netui.tags.html`.`FormatTag``
``pattern`,`

Fields from com.bea.wlw.netui.tags`.`AbstractBaseTag``
``ATTR_GENERAL`, `ATTR_GENERAL_EXPRESSION`, `ATTR_JAVASCRIPT`, `ATTR_STYLE`, `CLASS`, `ID`, `JAVASCRIPT_STATUS`, `NAME`, `NETUI_UNIQUE_CNT`, `ONCLICK`, `ONDBLCLICK`, `ONKEYDOWN`, `ONKEYPRESS`, `ONKEYUP`, `ONMOUSEDOWN`, `ONMOUSEMOVE`, `ONMOUSEOUT`, `ONMOUSEOVER`, `ONMOUSEUP`, `STYLE`, `TABINDEX``

Fields from javax.servlet.jsp.tagext`.`BodyTagSupport``
`bodyContent`

Fields from javax.servlet.jsp.tagext`.`TagSupport``
`id, pageContext`

Fields from interface javax.servlet.jsp.tagext`.`BodyTag``
`EVAL_BODY_BUFFERED, EVAL_BODY_TAG`

Fields from interface javax.servlet.jsp.tagext`.`IterationTag``
`EVAL_BODY_AGAIN`

Fields from interface javax.servlet.jsp.tagext`.`Tag``
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

## Constructor Summary

FormatNumber()

## Method Summary

`public int` | `doStartTag`() Create the internal Formatter instance and perform the formatting.
`public `String`` | `getTagName`() Return the name of the Tag.
`public `String`` | `getType`() Gets the type of number format to be used.
`protected void` | `localRelease`() Release any acquired resources.
`public void` | `setType`(`String` type) Sets the type of number format to be used (number, currency, or percent).

Methods from `com.bea.wlw.netui.tags.html.`FormatTag``
``getCountry`, `getLanguage`, `getLocale`, `getPattern`, `setCountry`, `setLanguage`, `setPattern``

Methods from `com.bea.wlw.netui.tags.`AbstractBaseTag``
``addTagIdMapping`, `evaluateAttributeToString`, `filter`, `filter`, `getJavaScriptUtils`, `getNearestForm`, `getScriptReporter`, `getUserLocale`, `localRelease`, `registerTagError`, `release`, `renderAttribute`, `rewriteName`, `write``

Methods from `javax.servlet.jsp.tagext.`BodyTagSupport``
`doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent`

Methods from `javax.servlet.jsp.tagext.`TagSupport``
`doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue`

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `javax.servlet.jsp.tagext.`BodyTag``
`doInitBody, setBodyContent`

Methods from interface `javax.servlet.jsp.tagext.`IterationTag``
`doAfterBody`

Methods from interface `javax.servlet.jsp.tagext.`Tag``
`doEndTag, doStartTag, getParent, release, setPageContext, setParent`

## Field Detail

### type

    protected String type

  The type of number format to be used.

## Constructor Detail

### FormatNumber

    public FormatNumber()

## Method Detail

### doStartTag() Method

    public int doStartTag()
         throws JspException

Create the internal Formatter instance and perform the formatting.

Overrides
  `FormatTag.doStartTag()`

#### Exceptions

``JspException``
  if a JSP exception has occurred

### getTagName() Method

    public String getTagName()

Return the name of the Tag.

Overrides
  `AbstractBaseTag.getTagName()`

### getType() Method

    public String getType()

Gets the type of number format to be used.

#### Returns

the type.

### localRelease() Method

    protected void localRelease()

Release any acquired resources.

Overrides
  `FormatTag.localRelease()`

### setType(String) Method

    public void setType(String type)

Sets the type of number format to be used (number, currency, or percent).

#### Parameters

type
  - the number format type.