commit extjs-2.2.1
[extjs.git] / examples / remoteload / EmployeePropertyGrid.js
1 /*\r
2  * Ext JS Library 2.2.1\r
3  * Copyright(c) 2006-2009, Ext JS, LLC.\r
4  * licensing@extjs.com\r
5  * \r
6  * http://extjs.com/license\r
7  */\r
8 \r
9 Ext.ns('App');\r
10 \r
11 App.EmployeePropertyGrid = Ext.extend(Ext.grid.PropertyGrid, {\r
12         load: function(config) {\r
13                 Ext.apply(config, {\r
14                         url: this.url,\r
15                         success: this.onLoad,\r
16                         scope: this\r
17                 });             \r
18                 Ext.Ajax.request(config);\r
19         },\r
20         onLoad: function(response, opts) {\r
21                 var json = Ext.decode(response.responseText);\r
22                 this.setSource(json);           \r
23         }\r
24 });\r
25 Ext.reg('employeepropertygrid', App.EmployeePropertyGrid);\r