RouteExtStore.js
764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var writer = new Ext.data.JsonWriter({
type: 'json',
encode: false,
listful: true,
writeAllFields: true,
returnJson: true
});
var reader = new Ext.data.JsonReader({
totalProperty: 'total',
successProperty: 'success',
idProperty: 'id',
root: 'routeext'
});
var proxy = new Ext.data.HttpProxy({
reader: reader,
writer: writer,
type: 'ajax',
api: {
// read: '/api/Routs/GetExtRoute'
read: '/api/Routs/GetExtRoute'
},
headers: {
'Content-Type': 'application/json; charset=UTF-8'
}
});
Ext.define('App.store.RouteExtStore', {
extend: 'Ext.data.Store',
model: 'App.model.RouteExt',
pageSize: 10,
autoLoad: false,
paramsAsHash: true,
proxy: proxy
});