使用Struts 2和Hibernate分页 [英] Using a pagination with Struts 2 and Hibernate

查看:128
本文介绍了使用Struts 2和Hibernate分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找想法来实现Struts2和Hibernate的分页。
例如,我的表格包含的行数太多,应该是我一次只能看到20行。使用 PREVIOUS NEXT 按钮。

解决方案

分页示例是此处。正如我已经在我的上一个答案中解释过的那样,displaytag是一个很好的图书馆,并且十年流行,它是开源的,所以您可以轻松地从源代码中获取创意,但是您可以按原样使用它,并且修改它以适应您的需求并不容易。这就是为什么你在寻找想法。感谢网站上那些赞同我意见的人,你可以在他的代码示例中找到。

I'm looking for ideas to implement a pagination with Struts2 and Hibernate. My table contains too many lines and it should be as I can see only 20 at a time, for example. With PREVIOUS and NEXT buttons.

解决方案

The pagination example is here. As I've already explained in my previous answer displaytag is a good library and was popular about decade, it's open source, so you could easily grab ideas from the sources, however you can use it as is, and it's not easy to modify it to suit your needs. That's why you are looking for ideas. Thanks the guy on the web who share the ideas that I agree with, you can find in his code example.

这篇关于使用Struts 2和Hibernate分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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