日期:2014-05-16 浏览次数:20422 次
var deptUserData = []; <s:if test="deptUserData!=null"> deptUserData=<s:property value="deptUserData"/>; </s:if> //参与者树 var tree = new Ext.tree.TreePanel({ id: 'tree', onlyLeafCheckable: true,// 只对叶子节点可选 animate: false, // 动画效果 rootVisible: false, autoScroll: true, disabled: false, width: 620, height: 300, //frame:true, border: true, // 边框 lines:true, //checkModel: 'single', loader: new Ext.tree.TreeLoader({ baseAttrs: { uiProvider: Ext.ux.TreeCheckNodeUI } }), renderTo:'assignTree', root: deptUserData }); tree.getRootNode().on('load',function(rootNode){ rootNode.expand(); for(var i = 0;i < checkedUsers.length;i++){ tree.getNodeById(checkedUsers[i]).getUI().checkbox.checked=true; } });