Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / docs / source / direct-tree.html
1 <html>\r
2 <head>\r
3   <title>The source code</title>\r
4     <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
5     <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
6 </head>\r
7 <body  onload="prettyPrint();">\r
8     <pre class="prettyprint lang-js">Ext.onReady(function(){\r
9     Ext.Direct.addProvider(Ext.app.REMOTING_API);\r
10 \r
11     var tree = new Ext.tree.TreePanel({\r
12         width: 400,\r
13         height: 400,\r
14         autoScroll: true,\r
15         renderTo: document.body,\r
16         root: {\r
17             id: 'root',\r
18             text: 'Root'\r
19         },\r
20         loader: new Ext.tree.TreeLoader({\r
21             directFn: TestAction.getTree\r
22         }),\r
23         fbar: [{\r
24             text: 'Reload root',\r
25             handler: function(){\r
26                 tree.getRootNode().reload();\r
27             }\r
28         }]\r
29     });\r
30 });\r
31 </pre>    \r
32 </body>\r
33 </html>