Google 喜欢在 Wicket 中进行寻呼
如何在 Wicket 中进行“google like”分页?您只显示指向前 10 个搜索结果页面的链接,然后当我单击第 10 页时,另外 10 个页面会添加到搜索结果中,等等。
我有一个典型的搜索表单和搜索结果列表。可能有很多搜索结果页面。
通常,只有前几个搜索结果页面是有趣的,但也必须能够看到所有搜索结果。
我想做这样的事情:
- 最初查询前 10 个搜索结果页面
- 如果用户单击第 10 页,则会查询另外 10 个搜索结果页面。
- 如果用户点击第20页,则会再次查询另外10个搜索结果页。
我不想一次性获取所有搜索结果,也不想获取所有搜索结果的数量。我只想获取接下来的 10 个搜索结果页面。
我目前使用 PageableListView 和 PagingNavigator 进行分页。
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:
- Initially first 10 search result pages are queried
- If user clicks page 10, additional 10 search result pages are queried.
- 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅这篇文章:http://java.dzone。 com/articles/wicket-tutorial-series-ui?page=0,1
另外,大多数数据库都允许您使用 SQL 语法检索查询结果的一部分,另请参阅这篇文章 http://faq.javaranch.com/java/PaginationOrPaging
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