jeditable is not working with json and spring

jeditable is not working with json and spring

cathercather Posts: 2Questions: 0Answers: 0
edited January 2014 in DataTables 1.8
Hi All,

Is it possible to use jeditable with json values to edit columns and save details in db using spring ???

I try like this


otable = $('#data _table').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bLengthChange": true,
"bAutoWidth": false,
"aLengthMenu": [[5, 10, 25], [5, 10, 25]],
sPaginationType: "bootstrap",
iDisplayLength: 5,
"sAjaxSource": "changeVal.do",
"aoColumns" : [
{"sWidth" : "5%","bSortable" : false },
{ "sClass": "edit" },
{"sWidth" : "20%","bSortable" : true },
{"sWidth" : "21%","bSortable" : true },
],
"aaSorting": [[2, 'asc']],
},
"fnRowCallback": function(nRow, aData, iDisplayIndex) {
nRow.setAttribute('id',aData[2]);
return nRow;
},
"fnDrawCallback": function() {
$('td.edit', this.fnGetNodes()).editable( 'updateVal.jsp', {
"submitdata": function ( value, settings ) {
return {
"row_id": this.parentNode.getAttribute('id'),
"id": this.getAttribute('id'),
"colName": this.getAttribute('col'),
"column": otable .fnGetPosition( this )[2]
};
},
"callback": function( sValue, y ) {
var aPos = otable .fnGetPosition( this );
otable .fnUpdate( sValue, aPos[0], aPos[1] );
otable .fnDraw();
},
"height": "14px",
"width": "100%"
} );
},
"fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
oSettings.jqXHR = $.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": function(data){
fnCallback(data);
}
}
});

Can anyone please explain how to update db using spring controller also..
This discussion has been closed.