# com.bea.wlw.netui.tags.html
CheckBoxGroup Class

public class CheckBoxGroup
extends `OptionsDataSourceTag`

Groups a collection of CheckBoxOptions, and handles databinding of their values. CheckBoxGroup binds to an Iterator of Strings. If CheckBoxGroup uses any Format tags, it must have those tags come before any nested CheckBoxOption tags.

Attribute Descriptions
Attribute | Required | Runtime Expression Evaluation | Data Bindable
--- | --- | --- | ---
dataSource | Yes | No | Read / Write
The name of a form bean property or an expression that contains the CheckBoxGroup state.
defaultValue | No | No | Read Only
A literal value or an expression that is used to set the CheckBoxGroup's initial state.
disabled | No | No | Read Only
A boolean value which if true will cause the CheckBoxGroup to be disabled.
labelStyle | No | No | No
The style of the label for each contained CheckBoxOption.
labelStyleClass | No | No | No
The style class of the label for each contained CheckBoxOption.
optionsDataSource | No | No | Read Only
An expression that is used to generate a set of dynamic CheckBoxOptions. If the underlying type is a `com.bean.wlw.netui.tags.GroupOption` the name, value, alt and accesskey may be individually set. If the underlying type is a `Map` the name and value may be set individually.
tagId | No | No | No
The ID of this button used by the enclosing html tag to get the tag's real ID attribute for Javascript and focus purposes. The real ID attribute id is generated based upon this name.

Related Topics

<netui:checkBoxGroup> Tag Sample
<netui:checkBoxOption> Tag Sample
``CheckBox``
``CheckBoxOption``

Hierarchy
  `Object`
  `TagSupport`
  `BodyTagSupport`
  `AbstractBaseTag`
  `DataSourceTag`
  `DefaultableDataSourceTag`
  `OptionsDataSourceTag`
  `CheckBoxGroup`

All Implemented Interfaces
  `BodyTag`, `IterationTag`, `Serializable`, `Tag`

## Field Summary

`public static final `String`` | `CHECKBOXGROUP_KEY` String

Fields from com.bea.wlw.netui.tags`.`AbstractBaseTag``
``ATTR_GENERAL`, `ATTR_GENERAL_EXPRESSION`, `ATTR_JAVASCRIPT`, `ATTR_STYLE`, `CLASS`, `ID`, `JAVASCRIPT_STATUS`, `NAME`, `NETUI_UNIQUE_CNT`, `ONCLICK`, `ONDBLCLICK`, `ONKEYDOWN`, `ONKEYPRESS`, `ONKEYUP`, `ONMOUSEDOWN`, `ONMOUSEMOVE`, `ONMOUSEOUT`, `ONMOUSEOVER`, `ONMOUSEUP`, `STYLE`, `TABINDEX``

Fields from javax.servlet.jsp.tagext`.`BodyTagSupport``
`bodyContent`

Fields from javax.servlet.jsp.tagext`.`TagSupport``
`id, pageContext`

Fields from interface javax.servlet.jsp.tagext`.`BodyTag``
`EVAL_BODY_BUFFERED, EVAL_BODY_TAG`

Fields from interface javax.servlet.jsp.tagext`.`IterationTag``
`EVAL_BODY_AGAIN`

Fields from interface javax.servlet.jsp.tagext`.`Tag``
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

## Constructor Summary

CheckBoxGroup()

## Method Summary

`public int` | `doAfterBody`() Save the body content of the CheckBoxGroup.
`public int` | `doEndTag`() Render the set of CheckBoxOptions.
`public int` | `doStartTag`() Determine the set of matches for the CheckBoxGroup
`protected `Object`` | `evaluateOptionsDataSource`() This method will evalute the optionsDataSource and return an object.
`public `String`` | `getDisabled`() Returns the boolean value or expression indicating the disable state of the CheckBoxGroup.
`public `String`` | `getLabelStyle`() Return the label style for each contained CheckBoxOption..
`public `String`` | `getLabelStyleClass`() Return the label style class for each contained CheckBoxOption..
`public `String`` | `getStyle`() Gets the style of the rendered html tag.
`public `String`` | `getStyleClass`() Gets the style class of the rendered html tag.
`public `String`` | `getTagId`() Return the ID of the checkbox group.
`public `String`` | `getTagName`() Return the name of the Tag.
`public boolean` | `isMatched`(`String` value) Checks whether the given value matches one of the CheckBoxGroup's selected CheckBoxOptions.
`protected void` | `localRelease`() Release any acquired resources.
`public void` | `setDisabled`(`String` disabled) Set the disable state either with the literal "true" or "false" or with an expression.
`public void` | `setLabelStyle`(`String` labelStyle) Set the label style for each contained CheckBoxOption..
`public void` | `setLabelStyleClass`(`String` labelStyleClass) Set the label style class for each contained CheckBoxOption..
`public void` | `setStyle`(`String` style) Sets the style of the rendered html tag.
`public void` | `setStyleClass`(`String` styleClass) Sets the style class of the rendered html tag.
`public void` | `setTagId`(`String` tagId) Set the ID of the checkbox group.

Methods from `com.bea.wlw.netui.tags.`OptionsDataSourceTag``
``getOptionsDataSource`, `setOptionsDataSource``

Methods from `com.bea.wlw.netui.tags.`DefaultableDataSourceTag``
``getDefaultValue`, `localRelease`, `setDefaultValue``

Methods from `com.bea.wlw.netui.tags.`DataSourceTag``
``getDataSource`, `localRelease`, `setDataSource``

Methods from `com.bea.wlw.netui.tags.`AbstractBaseTag``
``addTagIdMapping`, `evaluateAttributeToString`, `filter`, `filter`, `getJavaScriptUtils`, `getNearestForm`, `getScriptReporter`, `getUserLocale`, `localRelease`, `registerTagError`, `release`, `renderAttribute`, `rewriteName`, `write``

Methods from `javax.servlet.jsp.tagext.`BodyTagSupport``
`doInitBody, getBodyContent, getPreviousOut, release, setBodyContent`

Methods from `javax.servlet.jsp.tagext.`TagSupport``
`doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue`

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `javax.servlet.jsp.tagext.`BodyTag``
`doInitBody, setBodyContent`

Methods from interface `javax.servlet.jsp.tagext.`IterationTag``
`doAfterBody`

Methods from interface `javax.servlet.jsp.tagext.`Tag``
`doEndTag, doStartTag, getParent, release, setPageContext, setParent`

## Field Detail

### CHECKBOXGROUP_KEY

    public static final String CHECKBOXGROUP_KEY

## Constructor Detail

### CheckBoxGroup

    public CheckBoxGroup()

## Method Detail

### doAfterBody() Method

    public int doAfterBody()
         throws JspException

Save the body content of the CheckBoxGroup.

Overrides
  `BodyTagSupport.doAfterBody()`

#### Exceptions

``JspException``
  if a JSP exception has occurred

### doEndTag() Method

    public int doEndTag()
         throws JspException

Render the set of CheckBoxOptions.

Overrides
  `BodyTagSupport.doEndTag()`

#### Exceptions

``JspException``
  if a JSP exception has occurred

### doStartTag() Method

    public int doStartTag()
         throws JspException

Determine the set of matches for the CheckBoxGroup

Overrides
  `BodyTagSupport.doStartTag()`

#### Exceptions

``JspException``
  if a JSP exception has occurred

### evaluateOptionsDataSource() Method

    protected Object evaluateOptionsDataSource()
         throws JspException

This method will evalute the optionsDataSource and return an object. If the object return from evaluating the expression results in a Map that is returned. Otherwise we will return an iterator. This routine will always return either a valid Iterator or Map.

Overrides
  `OptionsDataSourceTag.evaluateOptionsDataSource()`

#### Exceptions

``JspException``

### getDisabled() Method

    public String getDisabled()

Returns the boolean value or expression indicating the disable state of the CheckBoxGroup.

#### Returns

the disabled state (true or false) or an expression

### getLabelStyle() Method

    public String getLabelStyle()

Return the label style for each contained CheckBoxOption..

#### Returns

the label style

### getLabelStyleClass() Method

    public String getLabelStyleClass()

Return the label style class for each contained CheckBoxOption..

#### Returns

the label style

### getStyle() Method

    public String getStyle()

Gets the style of the rendered html tag.

#### Returns

the style.

### getStyleClass() Method

    public String getStyleClass()

Gets the style class of the rendered html tag.

#### Returns

the style class.

### getTagId() Method

    public String getTagId()

Return the ID of the checkbox group.

#### Returns

the ID.

### getTagName() Method

    public String getTagName()

Return the name of the Tag.

Overrides
  `AbstractBaseTag.getTagName()`

### isMatched(String) Method

    public boolean isMatched(String value)

Checks whether the given value matches one of the CheckBoxGroup's selected CheckBoxOptions.

#### Parameters

value
  Value to be compared

### localRelease() Method

    protected void localRelease()

Release any acquired resources.

Overrides
  `OptionsDataSourceTag.localRelease()`

### setDisabled(String) Method

    public void setDisabled(String disabled)

Set the disable state either with the literal "true" or "false" or with an expression.

#### Parameters

disabled
  - true or false or an expression

### setLabelStyle(String) Method

    public void setLabelStyle(String labelStyle)

Set the label style for each contained CheckBoxOption..

#### Parameters

labelStyle
  - the label style

### setLabelStyleClass(String) Method

    public void setLabelStyleClass(String labelStyleClass)

Set the label style class for each contained CheckBoxOption..

#### Parameters

labelStyleClass
  - the label style

### setStyle(String) Method

    public void setStyle(String style)

Sets the style of the rendered html tag.

#### Parameters

style
  - the html style.

### setStyleClass(String) Method

    public void setStyleClass(String styleClass)

Sets the style class of the rendered html tag.

#### Parameters

styleClass
  - the html style class.

### setTagId(String) Method

    public void setTagId(String tagId)

Set the ID of the checkbox group.

#### Parameters

tagId
  - the ID.