Displaytag pagination not working while using back

2019-08-16 01:21发布

I'm using pagination in page1.jsp and I have links to page2.jsp. I have back button in pag2.jsp I'm in page1.jsp at pagination =2 If I click on links to page2.jsp and back to page1.jsp it showing page1.jsp with pagination=1 Can anybody help out with configuring pagination across the pages

2条回答
再贱就再见
2楼-- · 2019-08-16 01:47

Use the property

keepStatus="true"

Inside the display:table declaration.

查看更多
走好不送
3楼-- · 2019-08-16 01:55

You will have to store index of your pager in some scope, since it is outside request it should be session.

When user moves from page1 to page2, save the index of the pager.

When you are loading your page1.jsp's pager see if valid index is present in session or not, if not load the default, if yes set the pager index as per the value.

You will have to check how this can be written as per your pagination plugin, logic.

查看更多
登录 后发表回答