List of auto-generated checkboxes according to a data store.
Description | ||
new CheckBoxList(params?srcNodeRef?) |
Create a new CheckBoxList widget. |
Type | Description | |
_itemData | Dojo/store/Memory |
ItemData is a data in items. |
_styleAttr | Object |
when you want to set style for other node. you can do this by example...
_styleAttr:{
|
active | Boolean |
If true, this forces the control to enter the active state and classname 'amos-form-active' will be added. |
busy | Boolean |
If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added. |
columns | Number |
Number of columns. |
dataStore | DataStore | Object[] | String |
A data store is a repository of a set of data objects. |
disabled | Boolean |
If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted. |
displayField | String |
Field of data that is used as labels for each checkbox in the list. |
error | Boolean |
If true, this forces the control to enter the error state and classname 'amos-form-error' will be added. |
filled | Boolean |
A flag that shows whether a form element is filled in (true) or empty (false). |
filter | Object | Function |
A data filter. |
idProperty | String |
An unique id for an element. (The specified value must be unique within the document.) |
items | Dojo/store/Memory |
Items is a memory to collect a set of data. |
label | String |
Label of a checkbox list. |
name | String |
Name of each checkbox. When sending a request to server, this property is the parameter's name. |
readOnly | Boolean |
If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission. |
valid | Boolean |
Validity flag that shows whether a form element is validated to be valid (true) or invalid (false). |
value | String | Number | Object |
Value of the element. |
valueField | String |
Field of data that is used as values for each checkbox in the list. |
viewMode | Boolean |
If true, the control will show only the displayedValue. |
width | String |
Width of the controls. |
Return type | Description | |
__baseClassInherit(constructor) | None |
get className from superclass. |
_abortRequest() | None |
|
bind(dataStore) | Dojo/Deferred |
Bind data to the control. |
hide(elem?) | None |
Hide a specified element. The hidden element will not be displayed at all. |
isValid() | Boolean |
Returns true when value validation succeeded; otherwise, false. |
isVisible(elem?) | Boolean |
Return true if the element is visible, otherwise false. |
reset() | None |
Reset all state and value to default. |
show(elem?) | None |
Display a specified element. |
toggle(elem?) | None |
Toggle visibility of a specified element. |
unbind() | None |
Remove binded data from control |
Description | ||
bind-completed |
Fires when bind data completed. |
|
query-data-completed |
Fires when query data completed. |
|
query-data-error |
Fires when query data error. |
|
query-data-start |
Fires when start query data. |
ItemData is a data in items.
when you want to set style for other node. you can do this by example...
_styleAttr:{
style-property
:effected-node
}
this property was effected where this class was inherited and your widget was called by...
var widget = new YourWidget({
style:{
style-property
:style-value
}
});
now effected-node
in you widget will have style-property
= style-value
Default value: {}
If true, this forces the control to enter the active state and classname 'amos-form-active' will be added.
Default value: false
If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added.
Default value: false
If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted.
Default value: false
Field of data that is used as labels for each checkbox in the list.
Default value: label
If true, this forces the control to enter the error state and classname 'amos-form-error' will be added.
Default value: false
A flag that shows whether a form element is filled in (true) or empty (false).
Default value: false
A data filter.
// 1. for type of Function
this.set("filter", lang.hitch(this, function (item) {
return item["CHECK"] == true;
}));
// 2. for type of Object
this.set("filter", { CHECK: true });
An unique id for an element. (The specified value must be unique within the document.)
Default value: "id"
Items is a memory to collect a set of data.
Name of each checkbox. When sending a request to server, this property is the parameter's name.
If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission.
Default value: false
Validity flag that shows whether a form element is validated to be valid (true) or invalid (false).
Default value: true
Field of data that is used as values for each checkbox in the list.
Default value: id
get className from superclass.
<Object>
constructor
|
Required |
|
Bind data to the control.
<DataStore>
dataStore
|
Required |
DataStore for bind data to the control. |
Hide a specified element. The hidden element will not be displayed at all.
<Node>
elem
|
Optional |
Specified element to be hidden. |
Return true if the element is visible, otherwise false.
<Node>
elem
|
Optional |
Specified element to be checked. If not specified, domNode of the widget is used instead. |
Reset all state and value to default.
Display a specified element.
<Node>
elem
|
Optional |
Specified element to be displayed. |
Toggle visibility of a specified element.
<Node>
elem
|
Optional |
Specified element to toggle visibility. |
Remove binded data from control