Using the DisplayTag library with Struts 2 and external sorting (PaginatedLists) works great on my project.
Unfortunately, when I send to DisplayTag a non Paginated list and try to let DisplayTag to do the pagination, that is where the problems raise.
Currently, I can navigate to all pages of the results that I have without any problem. I am facing problems when I submit again the form to Struts to get the new results. Then the DisplayTag does not reset its page number to 1 but remains on the page it was on my last page selection and retains it.
So my list contains now different amount of data but DisplayTag is still showing on the page that i was before.
I got with request.getParameter("d-16544-p")
the current page number and tried to reset this manually to 1 with no luck.
Also the
(Integer.parseInt
(request.getParameter(
(new ParamEncoder(tableId)
.encodeParameterName(TableTagParameters.PARAMETER_PAGE)
)
)) - 1 ) * pageSize
suggested in the DisplayTag docs did not really help much.
So my question is, how is it possible to reset Displaytag to go to page "1" after I submit a new request to a Struts 2 action and get back the results.