fnServerData - Delphi App Server
fnServerData - Delphi App Server
fnServerData is badly documented. To what variable should I return JSON Object??
[code]
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bPaginate": true,
"bFilter": true,
"bSort": true,
"aoColumnDefs":[
{"bSortable":false, "aTargets":[0,11]},
{"bSearchable":true,"aTargets":[1,2,3]},
{"bSearchable":false,"aTargets":[0,4,5,6,7,8,9,10,11]},
],
"fnServerData": function ( sSource, aoData, fnCallback ) {
var returnObj;//like { "sEcho": 3, "iTotalRecords": 57, ... TO WHERE????
aoData=serverMethods().getProds(sSource, aoData);
}
});
[/code]
I am able to get aoData on Delphi app server, but to where shoud I save returned object?
[code]
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bPaginate": true,
"bFilter": true,
"bSort": true,
"aoColumnDefs":[
{"bSortable":false, "aTargets":[0,11]},
{"bSearchable":true,"aTargets":[1,2,3]},
{"bSearchable":false,"aTargets":[0,4,5,6,7,8,9,10,11]},
],
"fnServerData": function ( sSource, aoData, fnCallback ) {
var returnObj;//like { "sEcho": 3, "iTotalRecords": 57, ... TO WHERE????
aoData=serverMethods().getProds(sSource, aoData);
}
});
[/code]
I am able to get aoData on Delphi app server, but to where shoud I save returned object?
This discussion has been closed.
Replies
So fnCallback( aoData ); in your example, assuming aoData is the object?
Allan
[code]
returnObj=serverMethods().getProds(sSource, aoData);
[/code]
serverMethods().getProds(sSource, aoData);
do all the job. after called, I allready have all required data in returnObj
in JSON OBJECT format.
Assume that returnObj is complete json object, like above
{ "sEcho": 3, "iTotalRecords": 57...
what exactly shoud I write , to pass this data to datatables?