/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
+ * Ext JS Library 3.3.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
-Ext.onReady(function(){\r
-\r
- // create the Data Store\r
- var store = new Ext.data.Store({\r
- // load using HTTP\r
- url: 'sheldon.xml',\r
-\r
- // the return will be XML, so lets set up a reader\r
- reader: new Ext.data.XmlReader({\r
- // records will have an "Item" tag\r
- record: 'Item',\r
- id: 'ASIN',\r
- totalRecords: '@total'\r
- }, [\r
- // set up the fields mapping into the xml doc\r
- // The first needs mapping, the others are very basic\r
- {name: 'Author', mapping: 'ItemAttributes > Author'},\r
- 'Title', 'Manufacturer', 'ProductGroup'\r
- ])\r
- });\r
-\r
- // create the grid\r
- var grid = new Ext.grid.GridPanel({\r
- store: store,\r
- columns: [\r
- {header: "Author", width: 120, dataIndex: 'Author', sortable: true},\r
- {header: "Title", width: 180, dataIndex: 'Title', sortable: true},\r
- {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},\r
- {header: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}\r
- ],\r
- renderTo:'example-grid',\r
- width:540,\r
- height:200\r
- });\r
-\r
- store.load();\r
-});\r
+Ext.onReady(function(){
+
+ // create the Data Store
+ var store = new Ext.data.Store({
+ // load using HTTP
+ url: 'sheldon.xml',
+
+ // the return will be XML, so lets set up a reader
+ reader: new Ext.data.XmlReader({
+ // records will have an "Item" tag
+ record: 'Item',
+ id: 'ASIN',
+ totalRecords: '@total'
+ }, [
+ // set up the fields mapping into the xml doc
+ // The first needs mapping, the others are very basic
+ {name: 'Author', mapping: 'ItemAttributes > Author'},
+ 'Title', 'Manufacturer', 'ProductGroup'
+ ])
+ });
+
+ // create the grid
+ var grid = new Ext.grid.GridPanel({
+ store: store,
+ columns: [
+ {header: "Author", width: 120, dataIndex: 'Author', sortable: true},
+ {header: "Title", width: 180, dataIndex: 'Title', sortable: true},
+ {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
+ {header: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}
+ ],
+ renderTo:'example-grid',
+ width:540,
+ height:200
+ });
+
+ store.load();
+});