详情:在面板(视图)中我设置了 selModel :</p>
this.selModel = Ext.create('Ext.selection.CheckboxModel',{
listeners:{
selectionchange: function (sm,selections){
Ext.getCmp('removeButton').setDisabled(selections.length===0);
}
},
mode:'MULTI'
});
目标是删除被检查的项目在控制器中我写了一个函数:
remove:function(){
var view = Ext.widget('userlist');
selection = view.selModel.getSelection();
var store = this.getUsersStore();
if(selection){
store.remove(selection);
store.sync();
}else{
alert('failed!');
}
}
我就是无法获得“选择”,有什么问题吗?