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, pageContextFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Loads the Enumeration and stores its values in a page attribute.voidrelease()Releases the tag's state variables.voidsetClassName(String cName) Sets the Enumeration class name.voidsetExclude(String names) Sets the name of the enumeration entries to exclude.voidSets the enumeration item name.voidSets 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:
releasein interfaceTag- Overrides:
releasein classTagSupport
-
doEndTag
Loads the Enumeration and stores its values in a page attribute.- Specified by:
doEndTagin interfaceTag- Overrides:
doEndTagin classTagSupport- Returns:
- EVAL_PAGE always
- Throws:
JspException- if an error occurs or the className cannot be loaded
-