]> git.proxmox.com Git - extjs.git/blame - extjs/examples/kitchensink/classic/samples/view/direct/Tree.js
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / kitchensink / classic / samples / view / direct / Tree.js
CommitLineData
6527f429
DM
1/**\r
2 * This example shows how to use a Tree with nodes loaded dynamically from Ext Direct\r
3 * back end.\r
4 */\r
5Ext.define('KitchenSink.view.direct.Tree', {\r
6 extend: 'Ext.tree.Panel',\r
7 xtype: 'direct-tree',\r
8 controller: 'directtree',\r
9 \r
10 requires: [\r
11 'KitchenSink.view.direct.TreeController'\r
12 ],\r
13 \r
14 //<example>\r
15 exampleTitle: 'Ext Direct Tree integration',\r
16 exampleDescription: [\r
17 '<p>This example shows how to load Tree nodes dynamically from a Direct proxy.</p>'\r
18 ].join(''),\r
19 \r
20 otherContent: [{\r
21 type: 'ViewController',\r
22 path: 'classic/samples/view/direct/TreeController.js'\r
23 }, {\r
24 type: 'Base ViewController',\r
25 path: 'classic/samples/view/direct/DirectVC.js'\r
26 }, {\r
27 type: 'Server TestAction class',\r
28 path: 'data/direct/source.php?file=testaction'\r
29 }, {\r
30 type: 'Server API configuration',\r
31 path: 'data/direct/source.php?file=config'\r
32 }],\r
33 //</example>\r
34 \r
35 title: 'Direct Tree',\r
36 width: 600,\r
37 height: 350,\r
38 \r
39 rootVisible: false,\r
40 \r
41 store: {\r
42 store: 'tree',\r
43 \r
44 // By default, a tree with a hidden root will expand\r
45 // the root node automatically when the tree is created.\r
46 // We don't want that to happen since Direct API may not\r
47 // be ready at that point, so we set autoLoad to false\r
48 // which will disable auto-expanding.\r
49 // We will later expand the root node manually in the\r
50 // ViewController's finishInit() method.\r
51 autoLoad: false,\r
52 \r
53 proxy: {\r
54 type: 'direct',\r
55 directFn: 'TestAction.getTree',\r
56 paramOrder: ['node']\r
57 }\r
58 }\r
59});\r