]> git.proxmox.com Git - sencha-touch.git/blob - src/src/data/DirectStore.js
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / src / data / DirectStore.js
1 /**
2 * Small helper class to create an {@link Ext.data.Store} configured with an {@link Ext.data.proxy.Direct}
3 * and {@link Ext.data.reader.Json} to make interacting with an {@link Ext.direct.Manager} server-side
4 * {@link Ext.direct.Provider Provider} easier. To create a different proxy/reader combination create a basic
5 * {@link Ext.data.Store} configured as needed.
6 *
7 * Since configurations are deeply merged with the standard configuration, you can override certain proxy and
8 * reader configurations like this:
9 *
10 * Ext.create('Ext.data.DirectStore', {
11 * proxy: {
12 * paramsAsHash: true,
13 * directFn: someDirectFn,
14 * simpleSortMode: true,
15 * reader: {
16 * rootProperty: 'results',
17 * idProperty: '_id'
18 * }
19 * }
20 * });
21 *
22 * ###Further Reading
23 * [Sencha Touch Data Overview](../../../core_concepts/data/data_package_overview.html)
24 * [Sencha Touch Store Guide](../../../core_concepts/data/stores.html)
25 * [Sencha Touch Models Guide](../../../core_concepts/data/models.html)
26 * [Sencha Touch Proxy Guide](../../../core_concepts/data/proxies.html)
27 */
28 Ext.define('Ext.data.DirectStore', {
29 extend: 'Ext.data.Store',
30 alias: 'store.direct',
31 requires: ['Ext.data.proxy.Direct'],
32
33 config: {
34 proxy: {
35 type: 'direct',
36 reader: {
37 type: 'json'
38 }
39 }
40 }
41 });