]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | Ext.define('KitchenSink.model.grid.Book',{\r |
2 | extend: 'KitchenSink.model.Base',\r | |
3 | requires: [\r | |
4 | 'Ext.data.reader.Xml'\r | |
5 | ],\r | |
6 | proxy: {\r | |
7 | // load using HTTP\r | |
8 | type: 'ajax',\r | |
9 | url: 'data/grid/sheldon.xml',\r | |
10 | // the return will be XML, so lets set up a reader\r | |
11 | reader: {\r | |
12 | type: 'xml',\r | |
13 | // records will have an "Item" tag\r | |
14 | record: 'Item',\r | |
15 | idProperty: 'ASIN',\r | |
16 | totalRecords: '@total'\r | |
17 | }\r | |
18 | },\r | |
19 | fields: [\r | |
20 | // set up the fields mapping into the xml doc\r | |
21 | // The first needs mapping, the others are very basic\r | |
22 | {name: 'Author', mapping: '@author.name'},\r | |
23 | 'Title', 'Manufacturer', 'ProductGroup'\r | |
24 | ]\r | |
25 | });\r |