public class FormatTag extends VarTagSupport
Formatter. The resulting String can be assigned in the page,
request, session or application scopes by using "var" and "scope" or it can
be written directly to the JSP output.scope, varpageContext, parentTag| Constructor and Description |
|---|
FormatTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doEndTag()
Abstract method from the Tag interface.
|
int |
doStartTag()
Abstract method from the Tag interface.
|
protected java.lang.String |
format(java.lang.Object value)
Attempts to format an object using an appropriate
Formatter. |
java.lang.String |
getFormatPattern()
Get the format pattern
|
java.lang.String |
getFormatType()
Get the format type
|
java.lang.Object |
getValue()
Get the object to be formatted
|
void |
setFormatPattern(java.lang.String formatPattern)
Set the format pattern
|
void |
setFormatType(java.lang.String formatType)
Set the format type
|
void |
setValue(java.lang.Object value)
Set the object to be formatted
|
protected void |
writeOut(java.lang.Object value)
Calls
format(Object) and writes the resulting String to
the JSP output. |
export, getScope, getVar, setScope, setVargetActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, release, setPageContext, setParentpublic java.lang.String getFormatPattern()
public void setFormatPattern(java.lang.String formatPattern)
public java.lang.String getFormatType()
public void setFormatType(java.lang.String formatType)
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
protected java.lang.String format(java.lang.Object value)
Formatter. If
no formatter is available for the object, then this method will call
toString() on the object. A null value will
be formatted as an empty string.value - the object to be formattedprotected void writeOut(java.lang.Object value)
throws javax.servlet.jsp.JspException
format(Object) and writes the resulting String to
the JSP output.value - the object to be formatted and writtenjavax.servlet.jsp.JspExceptionpublic int doStartTag()
throws javax.servlet.jsp.JspException
StripesTagSupportdoStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class StripesTagSupportjavax.servlet.jsp.JspExceptionpublic int doEndTag()
throws javax.servlet.jsp.JspException
StripesTagSupportdoEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class StripesTagSupportjavax.servlet.jsp.JspException? Copyright 2005-2006, Stripes Development Team.