开发者

Google like paging in Wicket

开发者 https://www.devze.com 2023-01-06 04:40 出处:网络
How to do \"google like\" paging in Wicket? You only show links to 10 first search result pages, then when I click page 10, additional 10 more pages are added to search results etc.

How to do "google like" paging in Wicket? You only show links to 10 first search result pages, then when I click page 10, additional 10 more pages are added to search results etc.

I have a typical search form and list of search results. There are possibly many search result pages.

Typically only the first few search result pages are interesting and but it must be possible to also see all search results.

I'd like to do something like this:

开发者_运维问答
  1. Initially first 10 search result pages are queried
  2. If user clicks page 10, additional 10 search result pages are queried.
  3. If user clicks page 20, additional 10 search result pages are again queried.

I do not want to fetch all search results in one go, and I do not want to fetch number of all search results. I just want to fetch next 10 search result pages.

I currently use PageableListView and PagingNavigator to do paging.


See this article: http://java.dzone.com/articles/wicket-tutorial-series-ui?page=0,1

also, most databases will allow you to retrieve a part of a query result by using SQL syntax, see also this article http://faq.javaranch.com/java/PaginationOrPaging

0

精彩评论

暂无评论...
验证码 换一张
取 消