|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.format.NumberFormatTag
public abstract class NumberFormatTag
A JSP tag to support the rendering of formatted numeric values.
| Field Summary | |
|---|---|
protected String |
_className
|
protected DecimalFormat |
_nF
|
protected Number |
_value
|
| 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 |
| Constructor Summary | |
|---|---|
NumberFormatTag()
Initializes the tag. |
|
| Method Summary | |
|---|---|
int |
doEndTag()
Formats the number and writes it to the JSP output writer. |
int |
doStartTag()
Checks that a non-null value has been provided. |
protected void |
release(String pattern)
Releases the tag's state and resets the format pattern string. |
void |
setClassName(String cName)
Updates the CSS class for this formatted number. |
void |
setFmt(String pattern)
Updates the date format pattern. |
void |
setPageContext(PageContext ctxt)
Updates this tag's page context and loads the user object from the request. |
void |
setValue(Number value)
Sets the value to format. |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DecimalFormat _nF
protected Number _value
protected String _className
| Constructor Detail |
|---|
public NumberFormatTag()
| Method Detail |
|---|
public final void setClassName(String cName)
cName - the class Name(s)public final void setFmt(String pattern)
pattern - the format pattern stringDecimalFormat.applyPattern(String)public final void setValue(Number value)
value - the value to formatprotected void release(String pattern)
pattern - the new format patternpublic void setPageContext(PageContext ctxt)
setPageContext in interface TagsetPageContext in class TagSupportctxt - the new JSP page context
public int doStartTag()
throws JspException
doStartTag in interface TagdoStartTag in class TagSupportJspException - never
public int doEndTag()
throws JspException
doEndTag in interface TagdoEndTag in class TagSupportJspException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||