Get all value from datatables in server (Java Servlet Server)
Get all value from datatables in server (Java Servlet Server)
I know probably this was a silly question for others, but I'm really need help right now. (I'm using Java servlet as server side and JSP as client side)
I've create a datatables for my web app with datatables API for dynamically adding a new row. The API's work fine and the question is:
"How to post all value in the table to server after adding all needed row?"
I've tried to do with this code:
[code]
$(document).ready(function() {
var oTable;
oTable = $('#grid').dataTable({
"bPaginate": false,
"bFilter": false,
"bInfo": false,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "PaketServlet?action=",
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
}
});
} );
[/code]
note: PaketServlet was my servlet in Java.
But i've no idea what variables should i call on the servlet?
[code]request.getParameter("aoData");[/code] only return null value.
I've create a datatables for my web app with datatables API for dynamically adding a new row. The API's work fine and the question is:
"How to post all value in the table to server after adding all needed row?"
I've tried to do with this code:
[code]
$(document).ready(function() {
var oTable;
oTable = $('#grid').dataTable({
"bPaginate": false,
"bFilter": false,
"bInfo": false,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "PaketServlet?action=",
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
}
});
} );
[/code]
note: PaketServlet was my servlet in Java.
But i've no idea what variables should i call on the servlet?
[code]request.getParameter("aoData");[/code] only return null value.
This discussion has been closed.