Class AbstractSingleCheckedElementTag

All Implemented Interfaces:
DynamicAttributes, IterationTag, JspTag, Tag, TryCatchFinally, Serializable, EditorAwareTag
Direct Known Subclasses:
CheckboxTag, RadioButtonTag

public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedElementTag
Abstract base class to provide common methods for implementing databinding-aware JSP tags for rendering a single HTML 'input' element with a 'type' of 'checkbox' or 'radio'.
Since:
2.5.2
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • AbstractSingleCheckedElementTag

      public AbstractSingleCheckedElementTag()
  • Method Details

    • setValue

      public void setValue(Object value)
      Set the value of the 'value' attribute. May be a runtime expression.
    • getValue

      @Nullable protected Object getValue()
      Get the value of the 'value' attribute.
    • setLabel

      public void setLabel(Object label)
      Set the value of the 'label' attribute. May be a runtime expression.
    • getLabel

      @Nullable protected Object getLabel()
      Get the value of the 'label' attribute.
    • writeTagContent

      protected int writeTagContent(TagWriter tagWriter) throws JspException
      Renders the 'input(radio)' element with the configured value. Marks the element as checked if the value matches the bound value.
      Specified by:
      writeTagContent in class AbstractCheckedElementTag
      Returns:
      valid tag render instruction as per Tag.doStartTag().
      Throws:
      JspException
    • writeTagDetails

      protected abstract void writeTagDetails(TagWriter tagWriter) throws JspException
      Write the details for the given primary tag: i.e. special attributes and the tag's value.
      Throws:
      JspException