CheckBoxList

(esrith/amos/form/CheckBoxList)

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:{ 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

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.

Constructors Detail
new CheckBoxList(params?srcNodeRef?)

Create a new CheckBoxList widget.

Parameters:
Properties Detail
<Dojo/store/Memory>
_itemData

ItemData is a data in items.

<Object>
_styleAttr

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: {}

<Boolean>
active

If true, this forces the control to enter the active state and classname 'amos-form-active' will be added.

Default value: false

<Boolean>
busy

If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added.

Default value: false

<Number>
columns

Number of columns.

Default value: 1

<DataStore | Object[] | String>
dataStore

A data store is a repository of a set of data objects.

<Boolean>
disabled

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

<String>
displayField

Field of data that is used as labels for each checkbox in the list.

Default value: label

<Boolean>
error

If true, this forces the control to enter the error state and classname 'amos-form-error' will be added.

Default value: false

<Boolean>
filled

A flag that shows whether a form element is filled in (true) or empty (false).

Default value: false

<Object | Function>
filter

A data filter.

Sample:
     // 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 });
<String>
idProperty

An unique id for an element. (The specified value must be unique within the document.)

Default value: "id"

<Dojo/store/Memory>
items

Items is a memory to collect a set of data.

<String>
label

Inherited from _FormMixin but overwritten in esrith/amos/form/CheckBoxList.js:236

Label of a checkbox list.

<String>
name

Inherited from _FormConstruct but overwritten in esrith/amos/form/CheckBoxList.js:121

Name of each checkbox. When sending a request to server, this property is the parameter's name.

<Boolean>
readOnly

If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission.

Default value: false

<Boolean>
valid

Validity flag that shows whether a form element is validated to be valid (true) or invalid (false).

Default value: true

<String | Number | Object>
value

Value of the element.

<String>
valueField

Field of data that is used as values for each checkbox in the list.

Default value: id

<Boolean>
viewMode

If true, the control will show only the displayedValue.

Default value: false

<String>
width

Width of the controls.

Default value: "200px"

Methods Detail
__baseClassInherit
(
  • constructor
)

get className from superclass.

Parameters
  • <Object> constructor Required
_abortRequest
()
<Dojo/Deferred>
bind
(
  • dataStore
)

Bind data to the control.

Parameters
  • <DataStore> dataStore Required

    DataStore for bind data to the control.

hide
(
  • elem?
)

Hide a specified element. The hidden element will not be displayed at all.

Parameters
  • <Node> elem Optional

    Specified element to be hidden.

<Boolean>
isValid
()

Returns true when value validation succeeded; otherwise, false.

<Boolean>
isVisible
(
  • elem?
)

Return true if the element is visible, otherwise false.

Parameters
  • <Node> elem Optional

    Specified element to be checked. If not specified, domNode of the widget is used instead.

reset
()

Reset all state and value to default.

show
(
  • elem?
)

Display a specified element.

Parameters
  • <Node> elem Optional

    Specified element to be displayed.

toggle
(
  • elem?
)

Toggle visibility of a specified element.

Parameters
  • <Node> elem Optional

    Specified element to toggle visibility.

unbind
()

Remove binded data from control

Events Detail
bind-completed

Fires when bind data completed.

Event Payload:
  • <Object> data

    Data that bind to the control.

query-data-completed

Fires when query data completed.

Event Payload:
  • <Object> response

    Response when query data complete.

query-data-error

Fires when query data error.

Event Payload:
  • <Object> err

    Querying error detail.

query-data-start

Fires when start query data.

Event Payload: