Use for formatting the data into a format that supports control of amos. Class for formating data into format that is usable by AMOS. Type property must be defined then bind method is used to start formating data. For TYPE_JSON, data property must be defined. For TYPE_POST and TYPE_GET, both url and param properties must be defined.
Description | ||
new DataStore(option?) |
Create a new DataStore object. |
|
new DataStore(urlparamoption?) |
Create a new DataStore object with url and parameters. |
|
new DataStore(dataoption?) |
Create a new DataStore object with data. |
Description | ||
TYPE_GET |
bind data store with json type |
|
TYPE_JSON |
bind data store with json type |
|
TYPE_POST |
bind data store with json type |
Type | Description | |
callback | Function |
Callback function. This is executed after querying. |
data | Object |
A set of data. |
form | Node |
For posting form data, can provide either the DOM node of your form or the id of the form. |
handleAs | String |
A string representing how to convert the text payload of the response before passing the converted data to the success handler. Possible formats are "text", "json", "javascript", and "xml". |
headers | Object |
Object specifies headers to use for the request. |
param | Object |
Parameter that use to query data from service. |
preventCache | Boolean |
If true, this will send an extra query parameter to ensure the the server won't supply cached values. |
sync | Boolean |
If true, specifies pattern for query data is synchronous. |
timeout | Number |
Time in milliseconds before considering the request a failure and triggering the error handler. |
type | String |
Type of pattern for query data. |
url | String |
Path URL of service to use query data. |
useProxy | Boolean |
If true, it's query by use proxy page. |
Return type | Description | |
addCallback(callback) | None |
Add callback function. |
query(callbackerrback) | Dojo/Deferred |
Query data. |
Description | ||
query-completed |
Fires when querying is completed. |
|
query-error |
Fires when query error occurs. |
Create a new DataStore object with url and parameters.
For posting form data, can provide either the DOM node of your form or the id of the form.
A string representing how to convert the text payload of the response before passing the converted data to the success handler. Possible formats are "text", "json", "javascript", and "xml".
Default value: json
If true, this will send an extra query parameter to ensure the the server won't supply cached values.
Default value: false
Time in milliseconds before considering the request a failure and triggering the error handler.
Default value: 0
Add callback function.
<Function>
callback
|
Required |
Function to execute after querying. |