Java有什么好用的分页控件?

如题所述

第1个回答  2010-04-14
可用extremetable,功能强大,使用简单,支持后台分页,排序。

简单的示例(JSP):

<%
List countries = new ArrayList();
for (int i = 1; i <= 10; i++)
{
Map cinfo = new java.util.HashMap();
cinfo.put("cno", "coutry"+i);
cinfo.put("cname", "国家"+i);
cinfo.put("area", "所在州"+i);
cinfo.put("born",new Date());
countries.add(cinfo);
}
request.setAttribute("cinfos", countries);
%>

<ec:table
items="cinfos"
action="${pageContext.request.contextPath}/index.jsp"
imagePath="${pageContext.request.contextPath}/images/table/*.gif"
cellpadding="1"
title="您好!这是eXtremeTable的一个测试例子">
<ec:row highlightRow="true">
<ec:column property="cno"/>
<ec:column property="cname"/>
<ec:column property="area"/>
<ec:column property="born" cell="date" format="yyyy-MM-dd"/>
</ec:row>
</ec:table>本回答被提问者采纳
第2个回答  2010-04-14
Display tag
可以去这个地方看看
http://bei-jin-520.javaeye.com/blog/311357?page=2#comments我写的一个用
Display tag 分页的列子。有代码可以直接运行
第3个回答  2010-04-14
用extjs插件的Ext.grid.GridPanel类。