Class EnumTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.content.EnumTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
public class EnumTag
extends jakarta.servlet.jsp.tagext.TagSupport
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 jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.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 jakarta.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 interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.tagext.TagSupport
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionLoads the Enumeration and stores its values in a page attribute.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Returns:
- EVAL_PAGE always
- Throws:
jakarta.servlet.jsp.JspException- if an error occurs or the className cannot be loaded
-