Datatables server side - pagination in Java
Datatables server side - pagination in Java
Hi,
I want to ask regarding the datatables server side pagination in Java.
So, the datatables will have more than 100k records.
Then, I already have a pagination in my Java code so then it will only pass me 10 - 20 data per fetch and index is the parameter.
But the thing is, when I iterate the list to the datatables using ui:repeat, the data will only be 10 - 20.
Then I tried also with Java servlet, the thing is same, because I need to have a List that contain all data or in this case is >100k data, so then the servlet will control how many data it will pass to the datatable.
So, my question is, is there a way for me to populate the list over and over again when the user click the pagination page?
Or the only way in this datatables is by populating a List that contain all the data, then control it?
I am still a newbie, so please help me even if it is only an idea.
Thanks.
Answers
The Sever Side Processing Doc describes the parameters sent from the client to the server and the expected response. The expectation is your server code (Java) will read and process the parameters and return, in JSON format, the data and other required parameters for Datatables to display the data properly.
Please post any questions but I'm not sure there are many on this forum that use Java as the server code.
Kevin