level 11
410357434
楼主
异步加载设置
async: {
enable: true,
url:"TestAction!getNodes.action",
autoParam:["id", "pId"],
otherParam:{"otherParam":"zTreeAsyncTest"},
dataFilter: filter
},
function filter(treeId, parentNode, childNodes) {
if (!childNodes) return null;
return childNodes;
}
后台代码没有问题,可以成功返回标准JSON数据,但是在取到数据后ZTREE的所有父节点都生成了相同的子节点,没点击的也生成了子节点
,已经在网上找了半天的资料没解决问题,ztree的异步加载逻辑不是很清楚[绿豆蛙:瀑布汗~],麻烦大神帮忙解决下,谢谢!

2012年12月21日 06点12分
1
async: {
enable: true,
url:"TestAction!getNodes.action",
autoParam:["id", "pId"],
otherParam:{"otherParam":"zTreeAsyncTest"},
dataFilter: filter
},
function filter(treeId, parentNode, childNodes) {
if (!childNodes) return null;
return childNodes;
}
后台代码没有问题,可以成功返回标准JSON数据,但是在取到数据后ZTREE的所有父节点都生成了相同的子节点,没点击的也生成了子节点
