Class SingleTag

All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
SingleCheckTag, SingleRadioTag

public abstract class SingleTag extends FormElementTag
An abstract JSP tag to support the generation of HTML single-option checkboxes or radio buttons.
Since:
1.0
Version:
11.2
Author:
Luke
See Also:
  • Constructor Details

    • SingleTag

      protected SingleTag(String type, String className)
      Creates a new checkbox tag.
      Parameters:
      type - the type
      className - the DOM class name
  • Method Details

    • setClassName

      public final void setClassName(String cName)
      Sets the CSS class name for the checkbox label text .
      Overrides:
      setClassName in class ElementTag
      Parameters:
      cName - the CSS class name(s)
      See Also:
    • setLabel

      public final void setLabel(String label)
      Sets the checkbox label text.
      Parameters:
      label - the label text
    • setValue

      public final void setValue(Object objValue)
      Sets the checkbox value/alias.
      Overrides:
      setValue in class FormElementTag
      Parameters:
      objValue - the alias
    • setChecked

      public void setChecked(boolean checked)
      Sets if the checkbox is selected.
      Parameters:
      checked -
    • setDisabled

      public void setDisabled(boolean disabled)
      Marks this button as disabled.
      Parameters:
      disabled - TRUE if disabled, otherwise FALSE
    • setOnChange

      public final void setOnChange(String jsEvent)
      Sets the JavaScript onChange event for these checkboxes/radio buttons.
      Parameters:
      jsEvent - the JavaScript event code
    • release

      public void release()
      Specified by:
      release in interface Tag
      Overrides:
      release in class ElementTag
    • doEndTag

      public int doEndTag() throws JspException
      Renders the checkbox to the JSP output stream.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Returns:
      TagSupport.EVAL_PAGE
      Throws:
      JspException - if an I/O error occurs