Class ElementTag

All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
ButtonTag, FormElementTag, FormTag, ImageTag, LinkTag, 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:
10.0
Author:
Luke
See Also:
  • Field Details

  • 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 Tag
      Overrides:
      release in class 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(PageContext ctxt)
      Specified by:
      setPageContext in interface Tag
      Overrides:
      setPageContext in class TagSupport
    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class TagSupport
      Throws:
      JspException