使用后退按钮时,Displaytag分页不起作用 [英] Displaytag pagination not working while using back button

查看:82
本文介绍了使用后退按钮时,Displaytag分页不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在page1.jsp中使用分页,并且有指向page2.jsp的链接. 我在pag2.jsp中有后退按钮 我在分页= 2时位于page1.jsp中,如果我单击指向page2.jsp的链接并返回至page1.jsp,则它显示具有分页= 1的page1.jsp 有人可以帮忙配置页面上的分页吗?

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

推荐答案

您将不得不在某个范围内存储寻呼机的索引,因为它不在请求范围之内,因此应该是会话.

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

当用户从page1移至page2时,保存寻呼机的索引.

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

在加载page1.jsp的分页器时,请查看会话中是否存在有效索引;如果未加载默认索引,则按值设置分页器索引.

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.

这篇关于使用后退按钮时,Displaytag分页不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆