JSP代码片段
Insert title herevarsetting={/*check : {
enable : true,
chkStyle : "radio",
radioType: "id"
},*/async : {
enable :true,
url :"${ctx}/common/tree/river!getNodeData.action",
autoParam : ["id"],
dataFilter : filter
},
callback : {//beforeClick: beforeClick,
onClick : onClick
}
};functionfilter(treeId, parentNode, childNodes) {if(!childNodes)return null;for(vari= 0, l=childNodes.length; i
childNodes[i].name=childNodes[i].name.replace(/\.n/g,'.');
}returnchildNodes;
}functiononClick(event, treeId, treeNode, clickFlag) {varwin=art.dialog.open.origin;//来源页面
win.snstSet(treeNode.id, treeNode.name,$("#idx").val());
$.dialog.close();
}
$(document).ready(function() {
$.fn.zTree.init($("#tree"), setting);
});//-->