Ext同步加载树!
1、Action后台java代码
/*树加载*/var root = new Ext.tree.AsyncTreeNode({id:'0',text:'区域',leaf:false});var data=new Ext.tree.TreeLoader({url:'zone.do?op=showTreeNode'});var tree = new Ext.tree.TreePanel({root:root,title:'结构组织',region:'west',split:true,//可调collapsible:true,//隐藏显示loader:data,useArrows:true,autoScroll:true,width:180,minSize:160,maxSize:300,animate:true,//开启动画效果enableDD:false,//不允许子节点拖动border:false,//有边框lines:true,rootVisible:true //设为false,将隐藏root根节点});data.on('beforeload',function(treeLoader,node){ this.baseParams.id=node.attributes.id; },data); root.expand(true,true);