No data receibed when Queuing changes in Editor
No data receibed when Queuing changes in Editor

Hi, I have followed the guide described in this blog https://datatables.net/blog/2017-10-24
I have this Editors:
editorOpts = {
table: "#erdAnmCaConstTable",
idSrc: "anomalouscadatumId",
fields : [
{
data : "criticalAreaCode",
name : "criticalAreaCode"
},{
data : "a",
name : "a"
}, {
data : "b",
name : "b"
}, {
data : "c",
name : "c"
}, {
data : "x",
name : "x"
}] ,
formOptions: {
inline: {
onBlur : 'submit'
}
}
} ;
editor = new jq.fn.dataTable.Editor(editorOpts);
editor.on('postEdit', function(e, json, data){
changedRows.push('#'+data.anomalouscadatumId);
})
ajaxEditor = new jq.fn.dataTable.Editor(
jq.extend(true, {
ajax : '/PSSC/ErdiModificationController_updateDataGrid.dopss?identifier=${ErdWithErdiForm.identifier}'
}, editorOpts)
);
jq('#erdAnmCaConstTable').on( 'click', 'tbody td:not(:first-child)', function (e) {
editor.inline( this );
} );
// This is the onClick of my update button
function updateGrid(){
ajaxEditor
.edit(changedRows, false)
.submit();
changedRows.length = 0;
}
The DataTable
erdAnmCaConstTable = jq("#erdAnmCaConstTable").DataTable({
destroy: true,
ajax : {"url":'/whatever.dopss?identifier=${ErdWithErdiForm.identifier}',
"type": 'POST',
"method":"POST",
"dataType": "json",
"contentType": "application/json",
"dataSrc": ''
},
rowId: "anomalouscadatumId",
select : true,
aoColumns : [ {
"data" : "anomalouscadatumId",
"targets" : [ 1 ],
"title" : "hiddenTitle",
"defaultContent" : "",
"visible": false,
"sClass": "dt-center"
}, ..................
When i recibed the ajax call on java, the parameter 'data' does not exits (null) and action is edit
@RequestMapping(value = "/ErdiModificationController_updateDataGrid.dopss")
public void updateDataGrid(HttpServletRequest request, HttpServletResponse response) {
String action = request.getParameter("action");
String data = request.getParameter("data");
System.out.println(action);
System.out.println(data);
}
Console.....
edit
null
Why 'data' is null???????
This discussion has been closed.
Answers
In your browser:
Thanks,
Allan
hi,

this are the paremeters.....
Perfect - thank you. That shows that the client is sending a data parameter (which is an object that contains more information).
I suspect what is happening is that .NET is not decoding the object for you automatically like most other frameworks will. So there are two options:
ajax.data
to send JSON to the server, and just de-serialize that, rather than attempting to decode the HTTP parameter names.DtRequest
object from our libraries which can be used to perform the HTTP decoding for you.Regards,
Allan