用 Pager-taglib做分页。 在action 里有参数 开始索引号startIndex 一共数据个数total。
在用Pager-taglib 时,页面 按 下一页,没有反应。总是显示第一页的数据。
我不明白的是,怎么把startindex值传到 叶面 上
代码
maxPageItems="7" maxIndexPages="10"
export="offset,currentPageNumber=pageNumber" scope="request">
pg:index
pg:first
/pg:first
">[ #<%= pageNumber %> Skip ]
/pg:skip
pg:prev
/pg:prev
pg:pages
/pg:pages
pg:next
/pg:next
">[ Skip #<%= pageNumber %> ]
/pg:skip
pg:last
/pg:last
/pg:index
/pg:pager
谢谢
[b]问题补充:[/b]
ThinkingInAll 谢谢你亚。
你可真是个好人呀。
帮人都帮到底了。赫赫
谢谢。
我有个小问题,想问问。
我在底层用的是DetachedCriteria做的查询。
这个就是在网上一艘一大把的那个分页。
http://www.iteye.com/topic/14657?page=1
在struts2的action 里能得到 这些参数
ps.getItems()得到已分页好的结果集
ps.getIndexes()得到分页索引的数组
ps.getTotalCount()得到总结果数
ps.getStartIndex()当前分页索引
ps.getNextIndex()下一页索引
ps.getPreviousIndex()上一页索引
你说的offset,数据的偏移量应该是ps.getStartIndex()当前分页索引吧。
但是,那个pageNum 是什么呀。
就是这个地方没有搞明白。
还望赐教。
谢谢。