Using server side processing on datatable
Using server side processing on datatable
vjboston
Posts: 3Questions: 0Answers: 0
Hi,
I am fairly new to datatable and trying to explore. I was able to get client side datatable woking. However we have large dataset to be used hence I am trying to explore server side processing.
Our server side is a struts based java servlet application application.following are my questions.
1) When we are using server side processing how do the parameters like iDisplayStart,sSearch get passed to server ? Do thye get passed automatically or we have to pass explicitly though some code ?
2) I am trying to understand the diffrence between fnServerData and sAjaxSource . if our server side is a servlet what do I need to set these values to ?
Any sample code will be appreciated.
vj
I am fairly new to datatable and trying to explore. I was able to get client side datatable woking. However we have large dataset to be used hence I am trying to explore server side processing.
Our server side is a struts based java servlet application application.following are my questions.
1) When we are using server side processing how do the parameters like iDisplayStart,sSearch get passed to server ? Do thye get passed automatically or we have to pass explicitly though some code ?
2) I am trying to understand the diffrence between fnServerData and sAjaxSource . if our server side is a servlet what do I need to set these values to ?
Any sample code will be appreciated.
vj
This discussion has been closed.
Replies
They get passed automatically one every draw. See: http://datatables.net/usage/server-side
> 2) I am trying to understand the diffrence between fnServerData and sAjaxSource . if our server side is a servlet what do I need to set these values to ?
fnServerData is a callback function which will override the default Ajax call DataTables makes (if you don't want to use the default). sAjaxSource tells DataTables what the URL for the data is for the default Ajax function.
> Any sample code will be appreciated.
http://datatables.net/release-datatables/examples/data_sources/server_side.html
http://known-anton.blogspot.co.uk/2012/01/using-jquerydata-table-with-struts2.html
Allan