BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.html
Class FormatTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.bea.wlw.netui.tags.AbstractBaseTag
              extended by com.bea.wlw.netui.tags.html.FormatTag
All Implemented Interfaces:
HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
FormatDate, FormatNumber, FormatString

public abstract class FormatTag
extends AbstractBaseTag

Abstract base class for formatting tags. Provides the basic formatting properties, as well as the base for the internal FormatTag.Formatter class.

See Also:
Serialized Form

Nested Class Summary
static class FormatTag.Formatter
          Internal FormatTag.Formatter which performs the actual formatting.
 
Field Summary
protected  String pattern
          The pattern used by a FormatTag to do its formatting.
protected  String patternValue
           
 
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
FormatTag()
           
 
Method Summary
 int doStartTag()
          Create the internal Formatter instance and perform the formatting.
 String getCountry()
          Gets the country code for the locale.
 String getLanguage()
          Gets the language code for the locale.
 Locale getLocale()
          Returns the locale based on the country and language.
 String getPattern()
          Gets the pattern to be used by this FormatTag.
protected  void localRelease()
          Release any acquired resources.
 void setCountry(String country)
          Sets the country code for the locale.
 void setLanguage(String language)
          Sets the language code for the locale.
 void setPattern(String pattern)
          Sets the pattern to be used by this FormatTag.
 
Methods inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getTagName, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, registerError, registerTagError, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

pattern

protected String pattern
The pattern used by a FormatTag to do its formatting.


patternValue

protected String patternValue
Exclude:
Constructor Detail

FormatTag

public FormatTag()
Method Detail

getLanguage

public String getLanguage()
Gets the language code for the locale.

Returns:
the language code

setLanguage

public void setLanguage(String language)
Sets the language code for the locale.

Parameters:
language - - the language code
Beadoc.attributedescription:
Determines a formatting style for the specified language. The language attribute is optional, but it must be set when the country attribute is set. The language attribute takes a lowercase, two letter code as defined by ISO-639. For a list of language codes see ISO-639 Language Codes
Beadoc.attributesyntaxvalue:
string_language
Beadoc.databindable:
false

getCountry

public String getCountry()
Gets the country code for the locale.

Returns:
the country code.

setCountry

public void setCountry(String country)
Sets the country code for the locale.

Parameters:
country - - the country code
Beadoc.attributedescription:
Determines a formatting style for the specified country. The country attribute takes an uppercase, two letter code as defined by ISO-3166. For a list of country codes see ISO-3166 Country Codes
Beadoc.attributesyntaxvalue:
string_country
Beadoc.databindable:
false

getLocale

public Locale getLocale()
Returns the locale based on the country and language.

Returns:
the locale

getPattern

public String getPattern()
Gets the pattern to be used by this FormatTag.

Returns:
the pattern.

setPattern

public void setPattern(String pattern)
Sets the pattern to be used by this FormatTag.

Parameters:
pattern - - the pattern to be used
Beadoc.attributedescription:
The pattern used to format the input.

For detailed information on pattern syntax see java.text.DecimalFormat.

Beadoc.attributesyntaxvalue:
string_simpleDataFormat
Beadoc.databindable:
Read Only

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Create the internal Formatter instance and perform the formatting.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class AbstractBaseTag

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.