EXT中如何动态加载tree

halibobo8 2013-02-19
我想做一个tree导航,数据从数据库中动态加载,请大虾们给点现成的codes!
mhl1003 2013-02-25
示例如下:
// 创建树的根节点
var root = new Ext.tree.AsyncTreeNode({
text : "投保地区",
expanded : true,
id : '-1'
});
// 创建树
var data = new Ext.tree.TreeLoader({
dataUrl : rootPath
+ "/public/coveraddressmanager/coveraddressAction.ou?method=coveraddressTree"
});
var coveraddressTree = new Ext.tree.TreePanel({
loader : data,
root : root,
autoScroll : true,
animate : false,
useArrows : false,
border : false
});
Global site tag (gtag.js) - Google Analytics