Class ElementTag

java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
Direct Known Subclasses:
ButtonTag, FormElementTag, FormTag, ImageTag, LinkTag, MapDIVTag, MapDIVTag, RowTag, StaticMapTag, TableTag, UserProfileTag

public abstract class ElementTag extends BrowserInfoTag
A class for supporting JSP Tags that render HTML elements.
Since:
1.0
Version:
12.3
Author:
Luke
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Collection<String>
     
    protected final XMLRenderer
     
    protected jakarta.servlet.jsp.JspWriter
     

    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
    Modifier
    Constructor
    Description
    protected
    ElementTag(String elementName)
    Creates a new HTML element tag with a given HTML element type.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    protected int
    Gets and increments the current tab index count for the parent form tag.
    protected String
    Returns the type of HTML element this tag generated.
    protected FormTag
    Returns the parent form tag.
    void
     
    void
    Sets the CSS class name of this HTML element.
    void
    Sets the ID of this HTML element.
    protected void
    setNumericAttr(String attrName, int value, int minValue)
    Sets a numeric attribute.
    void
    setPageContext(jakarta.servlet.jsp.PageContext ctxt)
     
    void
    Associates a CSS style with this HTML element.

    Methods inherited from class BrowserInfoTag

    getBrowserContext, passedCAPTCHA

    Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport

    doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue

    Methods inherited from class Object

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

    • _data

      protected final XMLRenderer _data
    • _classes

      protected final Collection<String> _classes
    • _out

      protected jakarta.servlet.jsp.JspWriter _out
  • Constructor Details

    • ElementTag

      protected ElementTag(String elementName)
      Creates a new HTML element tag with a given HTML element type.
      Parameters:
      elementName - the HTML element type (eg. BODY, FORM, INPUT, etc.)
  • Method Details

    • getParentFormTag

      protected FormTag getParentFormTag()
      Returns the parent form tag.
      Returns:
      the parent FormTag, or null
    • getFormIndexCount

      protected int getFormIndexCount()
      Gets and increments the current tab index count for the parent form tag.
      Returns:
      the tabIndex
    • release

      public void release()
      Specified by:
      release in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      release in class jakarta.servlet.jsp.tagext.TagSupport
    • getName

      protected String getName()
      Returns the type of HTML element this tag generated.
      Returns:
      the HTML element type
    • setID

      public void setID(String id)
      Sets the ID of this HTML element.
      Parameters:
      id - the element ID
    • setClassName

      public void setClassName(String cName)
      Sets the CSS class name of this HTML element.
      Parameters:
      cName - the class name as refered to in a CSS file.
    • setStyle

      public void setStyle(String style)
      Associates a CSS style with this HTML element.
      Parameters:
      style - the CSS
    • setNumericAttr

      protected void setNumericAttr(String attrName, int value, int minValue)
      Sets a numeric attribute.
      Parameters:
      attrName - the attribute name
      value - the value
      minValue - the minimum value for the attribute
    • setPageContext

      public void setPageContext(jakarta.servlet.jsp.PageContext ctxt)
      Specified by:
      setPageContext in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      setPageContext in class jakarta.servlet.jsp.tagext.TagSupport
    • doStartTag

      public int doStartTag() throws jakarta.servlet.jsp.JspException
      Specified by:
      doStartTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.servlet.jsp.JspException