_BindMixin

(esrith/amos/core/_BindMixin)

Basic class for binding data. Easy to bind data by specifies store name and field name that is used to display.

Type Description
_itemData Dojo/store/Memory

ItemData is a data in items.

dataStore DataStore | Object[] | String

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

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.

Return type Description
_abortRequest() None
bind(dataStore) Dojo/Deferred

Bind data to the control.

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.

Properties Detail
<Dojo/store/Memory>
_itemData

ItemData is a data in items.

<DataStore | Object[] | String>
dataStore

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

<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.

Methods Detail
_abortRequest
()
<Dojo/Deferred>
bind
(
  • dataStore
)

Bind data to the control.

Parameters
  • <DataStore> dataStore Required

    DataStore for bind data to the control.

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: