I have a problem, which I cannot solve alone. So your help is very appreciated. Here we go: Always if I edit more than one row in my grid, I get a list of beans in my controller for further proceedings...e.g. save the changes, but if I edit only 1 row I get an empty list back or the list is null. It is only working if I edit more than 1 row.
Here is my store and proxy:
var billRecordStore = null;
function createbillRecordStore() {
var billRecordProxy = new Ext.data.HttpProxy({
api : {
read : applicationPath + '/filterRecords',
update : applicationPath + '/updateRecords'
},
type : 'json',
reader : {
type : 'json',
root : 'data',
idProperty : 'brid',
totalProperty : 'total'
},
writer : {
type : 'json'
},
actionMethods: {
create: 'POST', read: 'POST', update: 'POST', destroy: 'POST'
},
simpleSortMode: true
});
billRecordStore = Ext.create('Ext.data.Store', {
pageSize : 25,
model : 'billRecordModel',
storeId : 'billRecordStore',
proxy : billRecordProxy,
remoteSort : false,
autoLoad : false
});
}
That is my SpringMVC controller:
@ResponseBody
@RequestMapping(value = "/updateRecords", method =
{RequestMethod.POST, RequestMethod.GET}, produces =
"application/json")
public ResponseWrapper updateBillrecord(
@RequestBody List<BillRecordsDTO> dirtyBillRecords
) {
if (dirtyBillRecords != null && dirtyBillRecords.size() > 0)
{
billRecordService.updateBillRecords(dirtyBillRecords);
}
return null;
}
This list List<BillRecordsDTO> dirtyBillRecords
is allways null
if I am editing only 1 row in the grid. More than 1 edited row is working perfectly.
I have no exception thrown at the server side.
In the frontend I get only this exception in the chrome browser:
POST http://localhost:8080/servicetool/updateRecords?_dc=1384181576575 400 (Bad Request) ext-all-debug.js:32379
Ext.define.request ext-all-debug.js:32379
Ext.define.doRequest ext-all-debug.js:71730
Ext.define.update ext-all-debug.js:71455
Ext.define.runOperation ext-all-debug.js:74757
Ext.define.start ext-all-debug.js:74704
Ext.define.batch ext-all-debug.js:42884
Ext.define.sync ext-all-debug.js:43606
Ext.define.save ext-all-debug.js:43634
saveChanges billRecordController.js:113
Ext.create.items.tbar.handler serviceToolView.js:206
Ext.define.fireHandler ext-all-debug.js:46226
Ext.define.onClick ext-all-debug.js:46216
(anonymous function)
wrap
Any ideas? You need more information? Just tell me. Thank you very much in advance. edfred