PageRenderTime 23ms CodeModel.GetById 21ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/javascript-mode/extjs.ds

http://github.com/ridgetang/snippets
Unknown | 20 lines | 20 code | 0 blank | 0 comment | 0 complexity | d1b38a10f95377e20f6cc01d3f8c2087 MD5 | raw file
 1#name : define Store
 2#key : store
 3#group : extjs
 4# --
 5var ${1:store} = new Ext.data.Store({
 6    proxy: new Ext.data.HttpProxy({
 7        url: ${2:url},
 8        method: '${3:GET}'
 9    }),
10    reader: new Ext.data.JsonReader({
11        root: '${4:rootName}',
12        id: '${5:id}',
13        totalProperty: 'results'
14    },[
15        { name: '$5', mapping: '$4.$5' },
16        nmap$0
17    ]),
18    remoteSort: true, // turn on server-side sorting
19    sortInfo: {field: 'id', direction: 'ASC'}
20});