direct-tree.js
上传用户:shuoshiled
上传日期:2018-01-28
资源大小:10124k
文件大小:1k
源码类别:

中间件编程

开发平台:

JavaScript

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