仅更换Ext tree节点图标的方法

var maintaintype=win.comboMaintain.getValue(); Ext.Ajax.request({ url : 'servlet/SendInjunction', params : { type : 'maintain', unitid : curSelUnitId, call_letter : curSelCalls, maintaintype : maintaintype }, success : function(req) { var tree = view.findById('tree-panel'); var checkednodes = tree.getChecked(); for (var i = 0; i < checkednodes.length; i++) { if (checkednodes[i].attributes.id>0) { var iconsrc='images/maintain.png'; if(maintaintype==0){ iconsrc='images/vehicle_offline.gif'; }else{ iconsrc='images/maintain.png'; } checkednodes[i]. getUI().getIconEl().src = iconsrc; } } win.hide(); } });

你可能感兴趣的:(仅更换Ext tree节点图标的方法)