日期:2014-05-16 浏览次数:20418 次
[{"pkid":177,"text":"1","mkljdz":"1","bj":1,"xh":1,"fjmk":"3","cjxgrq":"May 17, 2011 7:47:50 PM","zmks":0,"lb":"0","jz":"1","leaf":true},{"pkid":178,"text":"2","mkljdz":"2","bj":1,"xh":2,"fjmk":"3","cjxgrq":"May 17, 2011 7:48:07 PM","zmks":0,"lb":"0","jz":"2","leaf":true},{"pkid":179,"text":"3","mkljdz":"3","bj":1,"xh":3,"fjmk":"3","cjxgrq":"May 17, 2011 7:48:38 PM","zmks":0,"lb":"0","jz":"3","leaf":true},{"pkid":180,"text":"4","mkljdz":"4","bj":1,"xh":4,"fjmk":"3","cjxgrq":"May 17, 2011 7:49:37 PM","zmks":0,"lb":"0","jz":"4","leaf":true},{"pkid":181,"text":"5","mkljdz":"5","bj":1,"xh":5,"fjmk":"3","cjxgrq":"May 17, 2011 7:51:20 PM","zmks":0,"lb":"0","jz":"5","leaf":true}]
listeners : { itemclick : function(view, rec, node) {//树节点单击时候记录下view、record、node View = view; Rec = rec; Node = node; view.expand(rec);//单击展开子节点 }
//这段代码很关键,与ExtJS3刷新node的方法完全不一样 Rec.removeAll();//清空当前节点下的子节点 xtmkTreeStore.load({ node : Rec,//读取当前节点 callback : function() { View.refresh();//刷新树视图! } });