Class AbstractSingleCheckedElementTag

All Implemented Interfaces:
jakarta.servlet.jsp.tagext.DynamicAttributes, jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, jakarta.servlet.jsp.tagext.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

      protected @Nullable 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

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

      protected int writeTagContent(TagWriter tagWriter) throws jakarta.servlet.jsp.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:
      jakarta.servlet.jsp.JspException
    • writeTagDetails

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