I'm using display tag to display my result set. Here's how I implement it.
<display:table name="w" pagesize="10" export="true" />
Here I've set pagesize =10
and when I run the app , the records are paged to size 10
but when I click on the next page to view the next set of records, I get an empty result set.
E.g if there are 12 records, 10 of them are displayed in the first page and when I click on next to view the last page, I get an empty page. Why is this happening??
w
contains a list of all my records :
request.setAttribute("w", resultrechparcritere);
The table must be able to contact the Action when handling the pagination,
then you have to include requestURI
, along with (the not-mandatory fields, if I remember well) keepStatus
and uid
:
<display:table requestURI = "myActionURL"
keepStatus = "true"
pagesize = "10"
name = "w"
uid = "myTable"
export = "true" />
Then, you can even intercept and tweak / hack the pagination parameters by yourself, to programmatically reach a specific page.