Class idx.form.CheckBoxList
Extends
dijit._Container, dijit.form._FormSelectWidget, idx.form._CompositeMixin, idx.form._CssStateMixin, idx.form._InputListMixin, idx.form._ValidationMixin.
idx.form.CheckBoxList is a composit widget which consists of a group of checkboxes.
CheckBoxList can be created in the same way of creating a dijit.form.Select control.
The only difference is that more than one options can be marked as selected.
NOTE: The "startup" method should be called after a CheckBoxList is created in Javascript.
In order to get the value of the checkboxes, you don't need to invoke the get("value") method of
each checkbox anymore, but simply call get("value") method of the CheckBoxList.
As a composite widget, it also provides following features:
- Built-in label
- Built-in label positioning
- Built-in required attribute
- One UI theme support
Defined in: <idx\form\CheckBoxList.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
- Fields borrowed from class idx.form._CompositeMixin:
- fieldWidth, help, hint, hintPosition, label, labelAlignment, labelWidth, required, unit
- Fields borrowed from class idx.form._ValidationMixin:
- instantValidate, invalidMessage, missingMessage, tooltipPosition
Method Summary
Method Attributes | Method Name and Description |
---|---|
destroy()
|
|
getValueFromOpts(Object)
Multiple set false in CheckBoxList
Single Selection
|
|
- Methods borrowed from class idx.form._CompositeMixin:
- _setFieldWidthAttr, _setHintAttr, _setLabelAlignmentAttr, _setLabelAttr, _setLabelWidthAttr, _setRequiredAttr, _setUnitAttr, reset, resize, validateAndFocus
- Methods borrowed from class idx.form._ValidationMixin:
- _isEmpty, _isValid, displayMessage, getErrorMessage, isValid, refocus, validate
Constructor Detail
idx.form.CheckBoxList()
Programmatic: new idx.form.CheckBoxList({ options: [ { label: 'foo', value: 'foo', selected: true }, { label: 'bar', value: 'bar' }, ] }); Declarative: <select jsId="cbl" data-dojo-type="oneui.form.CheckBoxList" data-dojo-props=' name="cbl", label="CheckBoxList:", value="foo"'> <option value="foo">foo <option value="bar">bar </select> Store Based: var data = { identifier: "value", label: "label", items: [ {value: "AL", label: "Alabama"}, {value: "AK", label: "Alaska"} ] }; var readStore = new dojo.data.ItemFileReadStore({data: data}); var cbl = new idx.form.CheckBoxList({ store: readStore });
Method Detail
destroy()
getValueFromOpts(Object)
- Parameters:
- {option} Object