|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.tag.StripesTagSupport
net.sourceforge.stripes.tag.VarTagSupport
net.sourceforge.stripes.tag.FormatTag
public class FormatTag
This tag accepts an object and formats it using an appropriate
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.
Field Summary |
---|
Fields inherited from class net.sourceforge.stripes.tag.VarTagSupport |
---|
scope, var |
Fields inherited from class net.sourceforge.stripes.tag.StripesTagSupport |
---|
pageContext, parentTag |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
FormatTag()
|
Method Summary | |
---|---|
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. |
Methods inherited from class net.sourceforge.stripes.tag.VarTagSupport |
---|
export, getScope, getVar, setScope, setVar |
Methods inherited from class net.sourceforge.stripes.tag.StripesTagSupport |
---|
getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, release, setPageContext, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormatTag()
Method Detail |
---|
public 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 formatted
protected void writeOut(Object value) throws JspException
format(Object)
and writes the resulting String
to
the JSP output.
value
- the object to be formatted and written
JspException
public int doStartTag() throws JspException
StripesTagSupport
doStartTag
in interface Tag
doStartTag
in class StripesTagSupport
JspException
public int doEndTag() throws JspException
StripesTagSupport
doEndTag
in interface Tag
doEndTag
in class StripesTagSupport
JspException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |