org.apache.taglibs.i18n
Class FormatTagSupport
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.taglibs.i18n.FormatTagSupport
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- FormatCurrencyTag, FormatDateTagSupport, FormatNumberTag, FormatPercentTag
public abstract class FormatTagSupport
- extends javax.servlet.jsp.tagext.TagSupport
An abstract base class for the formatting tags to provide
implementation inheritence.
- Version:
- $Revision$
- Author:
- James Strachan
- See Also:
- Serialized Form
|
Field Summary |
protected static java.lang.String |
_tagname
|
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
| 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 |
|
Method Summary |
int |
doEndTag()
|
int |
doStartTag()
|
java.lang.String |
getDefaultText()
|
protected abstract java.text.Format |
getFormat()
Abstract class to return the value formatter |
java.util.Locale |
getLocale()
If no Locale has been explicitly configured then use the
parent LocaleTag if present else the Locale from the ServletRequest
else use the default JVM Locale. |
protected int |
getStyleCode(java.lang.String style)
A helper method for date, datetime & time based formatting tags. |
java.lang.Object |
getValue()
|
protected void |
handleIOException(java.io.IOException e)
|
void |
release()
|
void |
setDefaultText(java.lang.String defaultText)
|
void |
setLocale(java.util.Locale locale)
|
void |
setValue(java.lang.Object value)
|
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_tagname
protected static java.lang.String _tagname
FormatTagSupport
public FormatTagSupport()
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
release
public void release()
- Specified by:
release in interface javax.servlet.jsp.tagext.Tag- Overrides:
release in class javax.servlet.jsp.tagext.TagSupport
getValue
public java.lang.Object getValue()
setValue
public void setValue(java.lang.Object value)
getLocale
public java.util.Locale getLocale()
- If no
Locale has been explicitly configured then use the
parent LocaleTag if present else the Locale from the ServletRequest
else use the default JVM Locale.
setLocale
public void setLocale(java.util.Locale locale)
getDefaultText
public java.lang.String getDefaultText()
setDefaultText
public void setDefaultText(java.lang.String defaultText)
getFormat
protected abstract java.text.Format getFormat()
- Abstract class to return the value formatter
handleIOException
protected void handleIOException(java.io.IOException e)
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
getStyleCode
protected int getStyleCode(java.lang.String style)
- A helper method for date, datetime & time based formatting tags.
This method converts a string into a DateFormat style code.
Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.