Originally posted by Pradeep Bhat:
What if the number of rows change ?
:roll:
that's always a problem when paging through data with multiple requests to the datastore.
One solution would be to retrieve all data once and use the JSTL c:forEach to scroll through them after storing the data in a List.
This might be impractical if the dataset is huge (if the data is pretty static I elect to cache it, killing the cache whenever the data changes on the datastore and rebuilding it using some triggering mechanism).
In cases of large sets of data that changes often, there's no getting around the problem you describe.
The user will just see a slightly different dataset from the expected one if a record was inserted or deleted that caused the number or rows before the current row to change.