Class idx.form.CheckBoxSelect
Extends
dijit._HasDropDown, idx.form._CompositeMixin, idx.form._CssStateMixin, idx.form._ValidationMixin.
idx.form.CheckBoxSelect is a composite widget which looks like a drop down version multi select control.
CheckBoxSelect 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.
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\CheckBoxSelect.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
Separator for the select button label.
|
- 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 |
---|---|
Close the drop down menu.
|
|
invertSelection(onChange)
Invert the selection.
|
|
isLoaded()
|
|
loadDropDown(loadCallback)
|
|
onChange(newValue)
Event triggered when the widget value changes.
|
|
reset()
Reset the value of the widget.
|
|
resize()
|
|
setStore(store, selectedValue, fetchArgs)
|
|
startup()
|
|
Toggle the drop down menu.
|
|
uninitialize(preserveDom)
|
- Methods borrowed from class idx.form._CompositeMixin:
- _setFieldWidthAttr, _setHintAttr, _setLabelAlignmentAttr, _setLabelAttr, _setLabelWidthAttr, _setRequiredAttr, _setUnitAttr, validateAndFocus
- Methods borrowed from class idx.form._ValidationMixin:
- _isEmpty, _isValid, displayMessage, getErrorMessage, isValid, refocus, validate
Constructor Detail
idx.form.CheckBoxSelect()
Programmatic: new idx.form.CheckBoxSelect({ options: [ { label: 'foo', value: 'foo', selected: true }, { label: 'bar', value: 'bar' }, ] }); Declarative: <select jsId="cbs" data-dojo-type="oneui.form.CheckBoxSelect" data-dojo-props=' name="cbs", label="CheckBoxSelect:", 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 cbs = new idx.form.CheckBoxSelect({ store: readStore });
Field Detail
{String} labelSeparator
Separator for the select button label.
- Default Value:
- ", "
Method Detail
closeDropDown()
Close the drop down menu.
invertSelection(onChange)
Invert the selection. Using the parameter onChange to indicate whether
onChange event should be fired.
- Parameters:
- {Boolean} onChange
isLoaded()
loadDropDown(loadCallback)
- Parameters:
- loadCallback
onChange(newValue)
Event triggered when the widget value changes.
- Parameters:
- newValue
openDropDown()
postCreate()
postMixInProperties()
reset()
Reset the value of the widget.
resize()
setStore(store, selectedValue, fetchArgs)
- Parameters:
- store
- selectedValue
- fetchArgs
startup()
toggleDropDown()
Toggle the drop down menu.
uninitialize(preserveDom)
- Parameters:
- preserveDom