在grid中加入Ext.grid.RowSelectionModel({singleSelect:true}),
不能实现复选效果啊。。
怎么用button的handler 这个属性把选中的值提交到后台啊
提交到servlet 不明白了 jdk1.5 win7 mysql
在grid中加入Ext.grid.RowSelectionModel({singleSelect:true}),
不能实现复选效果啊。。
怎么用button的handler 这个属性把选中的值提交到后台啊
提交到servlet 不明白了 jdk1.5 win7 mysql
[code="js"]
xtype:'button',
text:'保存',
handler:function(){
var selModel = grid.getSelectionModel();
var sels =selModel.getSelections();
var Ids = [];
if (typeof(sels) != 'undefined') {
var len = sels.length;
for(var i = 0; i < len; i++){
Ids[i]=sels[i].data.xxxId;
}
}
Ext.Ajax.request({
url : "/yourAction-yourSaveMethod.action",
method : 'POST',
params:{"paramName":Ids},
success : function(response) {
},
failure : function(response, options) {
}
});
}
[/code]