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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -