spring - How to change parameter name in datatable.net such as : "draw", "recordsTotal" , "recordsFiltered" -
i use pagingandsortingrepository
of spring framework app. when page interface in server response client parameter: totalpages
, totalelements
, numberofelements
,size
. client datatable jquery (datatable.net) needs draw
, recordstotal
, recordsfiltered
parameters. please me resolve problem.
use ajax.datasrc
callback preprocessing response :
$('#example').datatable( { serverside: true, ajax: { url: "path/to/server", datasrc: function(json) { json['recordstotal'] = json['totalelements']; json['recordsfiltered'] = json['numberofelements']; return json; } } });
Comments
Post a Comment