6 Ext.onReady(function(){
8 extend: 'Ext.data.Model',
10 // set up the fields mapping into the xml doc
11 // The first needs mapping, the others are very basic
12 {name: 'Author', mapping: 'ItemAttributes > Author'},
13 'Title', 'Manufacturer', 'ProductGroup'
17 // create the Data Store
18 var store = Ext.create('Ext.data.Store', {
25 // the return will be XML, so lets set up a reader
28 // records will have an "Item" tag
31 totalRecords: '@total'
37 var grid = Ext.create('Ext.grid.Panel', {
40 {text: "Author", flex: 1, dataIndex: 'Author', sortable: true},
41 {text: "Title", width: 180, dataIndex: 'Title', sortable: true},
42 {text: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
43 {text: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}
45 renderTo:'example-grid',