如果一个元素是通过add创建的,如
_panel.add(Ext.create('ServerSelectedCheckbox', { parentPanel: _panel, boxLabel: respObj.info[i].name, serverId: respObj.info[i].id, checked: _checked, cls: _css }));
那么可以通过遍历节点来解决
{ text:'全选', handler:function(btn){ for(var one in btn.up('window').down('tabpanel').items.items) { for(var two in btn.up('window').down('tabpanel').items.items[one].items.items) { var temp_obj = btn.up('window').down('tabpanel').items.items[one].items.items[two]; temp_obj.setValue(true); } } } }