Class EnumTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.content.EnumTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
A JSP tag to insert an Enumeration's values into a page attribute.
- Since:
- 3.2
- Version:
- 6.3
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Loads the Enumeration and stores its values in a page attribute.void
release()
Releases the tag's state variables.void
setClassName
(String cName) Sets the Enumeration class name.void
setExclude
(String names) Sets the name of the enumeration entries to exclude.void
Sets the enumeration item name.void
Sets the page attribute name.Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
EnumTag
public EnumTag()
-
-
Method Details
-
setVar
Sets the page attribute name.- Parameters:
vName
- the name of the attribute to store the data in
-
setClassName
Sets the Enumeration class name.- Parameters:
cName
- the class name
-
setItem
Sets the enumeration item name.- Parameters:
iName
- the item name or null if all values requested
-
setExclude
Sets the name of the enumeration entries to exclude.- Parameters:
names
- a comma-seprated list of enumeration names
-
release
public void release()Releases the tag's state variables.- Specified by:
release
in interfaceTag
- Overrides:
release
in classTagSupport
-
doEndTag
Loads the Enumeration and stores its values in a page attribute.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- EVAL_PAGE always
- Throws:
JspException
- if an error occurs or the className cannot be loaded
-