Package org.deltava.taglib.format
Class TextFormatTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.format.TextFormatTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
A JSP tag to support writing formatted text.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Formats the text and writes it to the JSP output writer.void
release()
Releases the tag's state variables.void
setClassName
(String cName) Updates the CSS class for this formatted number.void
setDefault
(String defValue) Sets the default value if the provided value is null.void
Sets the value to format.Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
TextFormatTag
public TextFormatTag()
-
-
Method Details
-
setValue
Sets the value to format.- Parameters:
value
- the value to format
-
setDefault
Sets the default value if the provided value is null.- Parameters:
defValue
- the default value
-
setClassName
Updates the CSS class for this formatted number. This will automatically enclose the output in a <SPAN> tag.- Parameters:
cName
- the class Name(s)
-
release
public void release()Releases the tag's state variables.- Specified by:
release
in interfaceTag
- Overrides:
release
in classTagSupport
-
doEndTag
Formats the text and writes it to the JSP output writer.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- TagSupport.EVAL_PAGE
- Throws:
JspException
- if an error occurs- See Also:
-