public abstract class

AbstractMultiCheckedElementTag

extends AbstractCheckedElementTag
java.lang.Object
   ↳ TagSupport
     ↳ org.springframework.web.servlet.tags.RequestContextAwareTag
       ↳ org.springframework.web.servlet.tags.HtmlEscapingAwareTag
         ↳ org.springframework.web.servlet.tags.form.AbstractFormTag
           ↳ org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
             ↳ org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
               ↳ org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag
                 ↳ org.springframework.web.servlet.tags.form.AbstractCheckedElementTag
                   ↳ org.springframework.web.servlet.tags.form.AbstractMultiCheckedElementTag
Known Direct Subclasses

Class Overview

Abstract base class to provide common methods for implementing databinding-aware JSP tags for rendering multiple HTML 'input' elements with a 'type' of 'checkbox' or 'radio'.

Summary

[Expand]
Inherited Constants
From class org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag
From class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
From class org.springframework.web.servlet.tags.RequestContextAwareTag
[Expand]
Inherited Fields
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
From class org.springframework.web.servlet.tags.RequestContextAwareTag
Public Constructors
AbstractMultiCheckedElementTag()
Public Methods
String getDelimiter()
Return the delimiter to be used between each 'input type="radio"' tag.
String getElement()
Get the HTML element used to enclose 'input type="checkbox/radio"' tag.
void setDelimiter(String delimiter)
Set the delimiter to be used between each 'input type="checkbox/radio"' tag.
void setElement(String element)
Set the HTML element used to enclose the 'input type="checkbox/radio"' tag.
void setItemLabel(String itemLabel)
Set the value to be displayed as part of the 'input type="checkbox/radio"' tag.
void setItemValue(String itemValue)
Set the name of the property mapped to the 'value' attribute of the 'input type="checkbox/radio"' tag.
void setItems(Object items)
Set the Collection, Map or array of objects used to generate the 'input type="checkbox/radio"' tags.
Protected Methods
abstract String getInputType()
Return the type of the HTML input element to generate: "checkbox" or "radio".
String getItemLabel()
Get the value to be displayed as part of the 'input type="checkbox/radio"' tag.
String getItemValue()
Get the name of the property mapped to the 'value' attribute of the 'input type="checkbox/radio"' tag.
Object getItems()
Get the Collection, Map or array of objects used to generate the 'input type="checkbox/radio"' tags.
String resolveId()
Appends a counter to a specified id as well, since we're dealing with multiple HTML elements.
int writeTagContent(TagWriter tagWriter)
Renders the 'input type="radio"' element with the configured setItems(Object) values.
[Expand]
Inherited Methods
From class org.springframework.web.servlet.tags.form.AbstractCheckedElementTag
From class org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag
From class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
From class org.springframework.web.servlet.tags.form.AbstractFormTag
From class org.springframework.web.servlet.tags.HtmlEscapingAwareTag
From class org.springframework.web.servlet.tags.RequestContextAwareTag
From class java.lang.Object
From interface org.springframework.web.servlet.tags.EditorAwareTag

Public Constructors

public AbstractMultiCheckedElementTag ()

Public Methods

public String getDelimiter ()

Return the delimiter to be used between each 'input type="radio"' tag.

public String getElement ()

Get the HTML element used to enclose 'input type="checkbox/radio"' tag.

public void setDelimiter (String delimiter)

Set the delimiter to be used between each 'input type="checkbox/radio"' tag.

By default, there is no delimiter.

public void setElement (String element)

Set the HTML element used to enclose the 'input type="checkbox/radio"' tag.

Defaults to an HTML '<span/>' tag.

public void setItemLabel (String itemLabel)

Set the value to be displayed as part of the 'input type="checkbox/radio"' tag.

May be a runtime expression.

public void setItemValue (String itemValue)

Set the name of the property mapped to the 'value' attribute of the 'input type="checkbox/radio"' tag.

May be a runtime expression.

public void setItems (Object items)

Set the Collection, Map or array of objects used to generate the 'input type="checkbox/radio"' tags.

Typically a runtime expression.

Parameters
items said items

Protected Methods

protected abstract String getInputType ()

Return the type of the HTML input element to generate: "checkbox" or "radio".

protected String getItemLabel ()

Get the value to be displayed as part of the 'input type="checkbox/radio"' tag.

protected String getItemValue ()

Get the name of the property mapped to the 'value' attribute of the 'input type="checkbox/radio"' tag.

protected Object getItems ()

Get the Collection, Map or array of objects used to generate the 'input type="checkbox/radio"' tags.

protected String resolveId ()

Appends a counter to a specified id as well, since we're dealing with multiple HTML elements.

Throws
JspException

protected int writeTagContent (TagWriter tagWriter)

Renders the 'input type="radio"' element with the configured setItems(Object) values. Marks the element as checked if the value matches the bound value.

Returns
  • valid tag render instruction as per javax.servlet.jsp.tagext.Tag#doStartTag().
Throws
JspException