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, parentTagEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE| 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 String |
format(Object value)
Attempts to format an object using an appropriate
Formatter. |
String |
getFormatPattern()
Get the format pattern
|
String |
getFormatType()
Get the format type
|
Object |
getValue()
Get the object to be formatted
|
void |
setFormatPattern(String formatPattern)
Set the format pattern
|
void |
setFormatType(String formatType)
Set the format type
|
void |
setValue(Object value)
Set the object to be formatted
|
protected void |
writeOut(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 String getFormatPattern()
public void setFormatPattern(String formatPattern)
public String getFormatType()
public void setFormatType(String formatType)
public Object getValue()
public void setValue(Object value)
protected String format(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(Object value) throws JspException
format(Object) and writes the resulting String to
the JSP output.value - the object to be formatted and writtenJspExceptionpublic int doStartTag()
throws JspException
StripesTagSupportdoStartTag in interface TagdoStartTag in class StripesTagSupportJspExceptionpublic int doEndTag()
throws JspException
StripesTagSupportdoEndTag in interface TagdoEndTag in class StripesTagSupportJspException© Copyright 2005-2006, Stripes Development Team.