X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/examples/direct/direct-tree.js diff --git a/examples/direct/direct-tree.js b/examples/direct/direct-tree.js new file mode 100644 index 00000000..0914c7d8 --- /dev/null +++ b/examples/direct/direct-tree.js @@ -0,0 +1,29 @@ +/*! + * Ext JS Library 3.0.0 + * Copyright(c) 2006-2009 Ext JS, LLC + * licensing@extjs.com + * http://www.extjs.com/license + */ +Ext.onReady(function(){ + Ext.Direct.addProvider(Ext.app.REMOTING_API); + + var tree = new Ext.tree.TreePanel({ + width: 400, + height: 400, + autoScroll: true, + renderTo: document.body, + root: { + id: 'root', + text: 'Root' + }, + loader: new Ext.tree.TreeLoader({ + directFn: TestAction.getTree + }), + fbar: [{ + text: 'Reload root', + handler: function(){ + tree.getRootNode().reload(); + } + }] + }); +});