org.apache.beehive.netui.tags.html
Class FormatTag

Object
  extended by SimpleTagSupport
      extended by AbstractSimpleTag
          extended by FormatTag
All Implemented Interfaces:
JspTag, SimpleTag, INetuiTag
Direct Known Subclasses:
FormatDate, FormatNumber, FormatString

public abstract class FormatTag
extends AbstractSimpleTag

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


Nested Class Summary
static class FormatTag.Formatter
          Internal FormatTag.Formatter which performs the actual formatting.
 
Field Summary
protected  String _pattern
           
 
Constructor Summary
FormatTag()
           
 
Method Summary
 Locale getLocale()
          Returns the locale based on the country and language.
 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 AbstractSimpleTag
getBufferBody, getHtmlTag, getIdForTagId, getInlineError, getPageContext, getScriptReporter, getTagName, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class SimpleTagSupport
doTag, findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_pattern

protected String _pattern
Constructor Detail

FormatTag

public FormatTag()
Method Detail

setLanguage

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

Parameters:
language - the language code

setCountry

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

Parameters:
country - the country code

getLocale

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

Returns:
the locale
Throws:
JspException

setPattern

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

Parameters:
pattern - the pattern to be used
Throws:
JspException