var cell=grid.getSelectionModel().each(function(rec){
// var jsonBean={dept:{id:rec.get('dept.id'),CDept:rec.get('dept.cDept'),CDeptname:rec.get('dept.cDeptname')}};
//var newJson=Ext.encode(Ext.decode(jsonBean));
Ext.Ajax.request({
url: 'addTJdept.action',
method: 'POST',
scope: this,
params:{
id:rec.get('dept.id')
},
success: function(response, opts){
。。。。。。。。。。。。。
我用的是Struts2+Spring+Hibernate+Extjs
是用Extjs的EditorGridPanel进行修改,不能弹出修改窗体,就直接在表格里修改,然后点击保存提交
上面我注释掉的代码是测试用的 可以获得我选择行的任何值
不过下面的params传参 只能传个字段,不能传一个对象么?
如果用form表单的话,Struts2会自动帮我填充到对象中,
Ext.ajax.request不行么?
我的action返回的是JSON对象的,这里主要就是传个dept这个对象该怎么传到后台Action中