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, pageContext

    Fields inherited from interface jakarta.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface jakarta.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Loads the Enumeration and stores its values in a page attribute.
    void
    Releases the tag's state variables.
    void
    Sets the Enumeration class name.
    void
    Sets the name of the enumeration entries to exclude.
    void
    setItem(String iName)
    Sets the enumeration item name.
    void
    setVar(String vName)
    Sets 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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EnumTag

      public EnumTag()
  • Method Details

    • setVar

      public void setVar(String vName)
      Sets the page attribute name.
      Parameters:
      vName - the name of the attribute to store the data in
    • setClassName

      public void setClassName(String cName)
      Sets the Enumeration class name.
      Parameters:
      cName - the class name
    • setItem

      public void setItem(String iName)
      Sets the enumeration item name.
      Parameters:
      iName - the item name or null if all values requested
    • setExclude

      public void setExclude(String names)
      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 interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      release in class jakarta.servlet.jsp.tagext.TagSupport
    • doEndTag

      public int doEndTag() throws jakarta.servlet.jsp.JspException
      Loads the Enumeration and stores its values in a page attribute.
      Specified by:
      doEndTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class jakarta.servlet.jsp.tagext.TagSupport
      Returns:
      EVAL_PAGE always
      Throws:
      jakarta.servlet.jsp.JspException - if an error occurs or the className cannot be loaded