Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / examples / direct / direct-tree.js
1 /*!
2  * Ext JS Library 3.1.0
3  * Copyright(c) 2006-2009 Ext JS, LLC
4  * licensing@extjs.com
5  * http://www.extjs.com/license
6  */
7 Ext.onReady(function(){\r
8     Ext.Direct.addProvider(Ext.app.REMOTING_API);\r
9 \r
10     var tree = new Ext.tree.TreePanel({\r
11         width: 400,\r
12         height: 400,\r
13         autoScroll: true,\r
14         renderTo: document.body,\r
15         root: {\r
16             id: 'root',\r
17             text: 'Root'\r
18         },\r
19         loader: new Ext.tree.TreeLoader({\r
20             directFn: TestAction.getTree\r
21         }),\r
22         fbar: [{\r
23             text: 'Reload root',\r
24             handler: function(){\r
25                 tree.getRootNode().reload();\r
26             }\r
27         }]\r
28     });\r
29 });\r