3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
20 Ext.onReady(function(){
22 extend: 'Ext.data.Model',
24 // set up the fields mapping into the xml doc
25 // The first needs mapping, the others are very basic
26 {name: 'Author', mapping: 'ItemAttributes > Author'},
27 'Title', 'Manufacturer', 'ProductGroup'
31 // create the Data Store
32 var store = Ext.create('Ext.data.Store', {
39 // the return will be XML, so lets set up a reader
42 // records will have an "Item" tag
45 totalRecords: '@total'
51 var grid = Ext.create('Ext.grid.Panel', {
54 {text: "Author", flex: 1, dataIndex: 'Author', sortable: true},
55 {text: "Title", width: 180, dataIndex: 'Title', sortable: true},
56 {text: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
57 {text: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}
59 renderTo:'example-grid',