在公司实习看到公司框架里使用了ligerUI的grid进行分页,个人感觉挺好用的,自己摸索着实现了一遍记录下来
简单来说,liger grid 就是提交准备好的数据到指定的目标请求数据,拿到数据以后,显示出来(通过ajax实现)。
ligerGrid是ligerui系列插件的核心控件,用户可以快速地创建一个美观,而且功能强大的表格,支持排序、分页、多表头、固定列等等。
这里只实现基于ligerUI的分页
LigerUI的分页方式有两种:local和server。
如果数据量不是很大,就直接采用local分页,一次性的把数据全部发送到前台来,之后LigerUI自身的grid会自动分页。说一下 total,在后台传送jsonString时传送定义好的total(总条数),你可以定义多少都可以,但是到前台它会自动将总条数赋值给total, 这是local下的方式。
而如果数据量很大,一次性加载直接不显示数据或反应很慢的,就需要用server分页了,当用server分页时,每次请求都会比local时多发送两个参数:page和pagesize,不需要自己去发送,只需要在后台获取就行,
int page=Integer.parseInt(request.getParameter("page"));
int pagesize=Integer.parseInt(request.getParameter("pagesize"));
int total;
这时你可以把page和pagesize写进你的sql语句:
sql=".........";
sql+=" limit "+(page*pagesize-pagesize)+","+pagesize;
这样查出的结果放入jsonString中,这里要注意total了,total需要自己定义,需要自己重新查一下结果的总条数后赋值给total传到页面,其他的LigerUI会帮你搞定!
关于更多的ligerUI grid参官网考API http://api.ligerui.com/?to=grid
关于选择前端分页还是后台分页参考博客http://blog.csdn.net/xiaoyousifang/article/details/5659667
local实现只需要将查询的数据全部提交到前端框架会自动帮你实现分页,但是我个人并不提倡进行客户端分页,Web应用服务器和客户端之间是网络,如果网络传递的数据量越少,则客户端获得响应的速度越快.而且一般来说,数据库服务器和Web应用服务器的处理能力一般比客户端要强很多.从这两点来看,在客户端分页的方案是最不可取的
下面上server端分页代码:
由于只使用了分页所以只导入了部分插件和图片
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPMAAAI2CAIAAAAKLilGAAAgAElEQVR4nO2d/3Mc5X3H1f+An/xDf+wPnkzdTkOAYA5wM05DkwwBmk5n8EwnnaYz22aSGZsacEEiqm3ZCAfCgoLdjsngAd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njlzpmHj5zbddPHK1enZBc9sMeG7a3+sfd0AAAFfSURBVNNNiuMyykFKFqnGz0aMDzK2CDWzHcepVCq2bY+NjcU3frb7Jm8q4po9Pbvgaj09u/Bs99cVx2WSg5RWf9Qw27zAQNsgaLbjOBMTExs3bpyZmYlpvOORm72piGu2t03PLmzvullxXJo5yACR0VdnzDY4yNgiBM2enp7WGbOf7lwp3j6Kik/PLvR13qI4LoscpPiXIGBt49mIfzwzv6mZPTU1pTnP/vmGW1yVvU30+4kN2mYnl4P0XpVXf4yY7bUXejA3yNgi1MzWf2+k98FbQ1qLDx578FbFcSnmIH3vhRP41R81zDY5yNgipMxu6v3sLetvc1X+dGpOnGe7T3vuv22JF5GHHCS7AVoCKbObYuN9t508NyfdzlbmN92nb3bucpD4CNLhbHb3utu71q7qWreqa92qTuG/XWtXda1d1b2uma+Iz08Osjb54D5gO5zNBrSB2YAmMBvQ5P8BdJ2F971PVd0AAAAASUVORK5CYII=" alt="" />
引入需要的jquery,liger和css
<link href="js/ligerui-all.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery-3.0.0.js"></script>
<script type="text/javascript" src="js/ligerui.all.js"></script>
jsp中样例如下:在ligerGrid中需要指定dataAction(默认是local),请求的url,page和pageSize,其中page和pageSize可以在后台获取
<script type="text/javascript" >
$(function(){
var grid = $("#maingrid").ligerGrid({
columns: [
{ name: 'id', display: '序号',
render:function(record, rowindex, value, column){
return rowindex+1;
}
},
{ name: 'title', display: '标题'}
],
height:210,
dataAction:"server",
url:"LUServlet",
page:"1",
pageSize:"5"
});
});
</script>
</head>
<body>
<div style="width:600px">
<div id="maingrid"></div>
</div>
model类和测试数据库
//为了省事用sql.Date
import java.sql.Date;
public class Blog {
private int id;
private int category_id;
private String title;
private String content;
private Date created_time;
//getter和setter方法
@Override
public String toString() {
return "Blog [id=" + id + ", category_id=" + category_id + ", title=" + title + ", content=" + content
+ ", created_time=" + created_time + "]";
} }
aaarticlea/png;base64,iVBORw0KGgoAAAANS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+EWodr0A8NyoVOLAUOHR5hW8ylj03w2FXtuWiy7EAsBupHC5BWl0yM2OVnt21y4JQxm23r1Duyg1XzauLzIGXdQ6d9qs8hZW4M+Gkpt5azVo/NiIumO6UKXFsOGziRMLskI+rbJMNpW86kQ2RspTF5Rwjb5MdvWr3dABwm3EMkX9SWoKVyBaytnnRjxf1svdGgxcOhGJEzljFZMHlE6PWLiyrxdwPNr9brmcsYYm2btLoBNi6XwVrG8ArcJ5Yxl85PdFsAqNJht8y+a8dl00CLnt66iLov9e15MpsW8CRFsuaa25UnWxmePC11aDBw6kzC5JCPo2ybtlFPvqCRM+0aJe7ec8QNO2krAd3LlraNmqS/uHXYDXbt3GIdt/gUcn4JkOAoT/8hJY7m+tt1HCrrnRPCFDi2GDt04hOn0iKlPRkmY9o1SN17lJwj8Gl63pwAaXZ50Caibyd8OYvt2ALNt/kUdn0IHua+YxIA0Z4pPrOHaOJc7fXG4EG4xbLik0B0uTHWWlL5tAkYYON/Ajr8x5cAoGSd/PWqdJ/95MWnXNd1zikDCFME2/yKNT7mDBDeNz5jOi4lVJsDaXPQFvNClxcChMwmTSzKCvm0CekgXFBKmfaNk2i7tBqLz5OcG9PIk63PFhMM2/8J5B3YQZ7N2kahcbvxwTa5NOJn7hM5uhkuLYUOHR5jazTD3zHIhp5e48Z/KeUVJvPUZHjB3l+82RN0DZsCSyVHe54oJh23+pfNO10HdE3rBR7l/xYBoP4gEauP3s/td6NRiyNCZhMklS8rAFsMdT2WcUcJsG3kXN3QmYXJJRhDX+ugRxF8wRwmzbeRd3NCRMCVeMEcJs23kXdzQmYTJJUtKXOujRxB/wRwlzLaRd3FDZxIml2QEca2PHkH8BXOUMNtG3sUNHQlT4gVzlDDbRt7FDZ1JmChLCkEQUfD62ROCIIhAkDARBIEOEiaCINBBwkQQBDpImAiCQAcJE0EQ6CBhIggCHf8Pj2f2ruFQNO4AAAAASUVORK5CYII=" alt="" />
dao类,用jdbc测试
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import model.Blog; public class MysqlTest {
PreparedStatement ps = null;
ResultSet rs = null;
Connection connect = null; public MysqlTest() {
try {
Class.forName("com.mysql.jdbc.Driver");
connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/blogs_stu", "root", "");
} catch (Exception e) {
e.printStackTrace();
}
}
//返回一个Blog数组,用于拼接json字符串
//不用model时可以直接在此处拼接json字符串返回
//传入page和pagesize用于判断最后一页数组长度,否则会报错
public Blog[] getInfo(String sql,int page,int pagesize) {
int total=getTotal();
if(page*pagesize>=total){
pagesize=total%pagesize;
}
Blog[] blog = new Blog[pagesize];
try {
ps = connect.prepareStatement(sql);
rs = ps.executeQuery();
int index=0;
while (rs.next()) {
blog[index]=new Blog();
blog[index].setId(rs.getInt("id"));
blog[index].setCategory_id(rs.getInt("category_id"));
blog[index].setTitle(rs.getString("title"));
blog[index].setContent(rs.getString("content"));
blog[index].setCreated_time(rs.getDate("created_time"));
index++;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (connect != null)
try {
connect.close();
ps.close();
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
return blog;
}
//获取总记录数total
public int getTotal(){
int total=0;
String sql="";
try {
sql="select count(id) from blog";
ps = connect.prepareStatement(sql);
rs = ps.executeQuery();
while(rs.next()){
total=rs.getInt(1);
}
} catch (SQLException e) {
e.printStackTrace();
}
return total;
}
}
后台servlet实现
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import model.Blog;
import mysqljdbc.MysqlTest; @WebServlet("/LUServlet")
public class LUServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
response.setContentType("text/html; charset=utf-8");
//获取页面的page和pagesize,拼接sql用
int page=Integer.valueOf(request.getParameter("page"));
int pagesize=Integer.valueOf(request.getParameter("pagesize")); MysqlTest test=new MysqlTest();
//在拼接json字符串是传给前台一个total记录总数,ligerUI grid会自动获取该total
int total=test.getTotal();
request.setAttribute("total", total);
//用的mysql,查找限定条数语句用limit,从page*pagesize-pagesize开始,取pagesize条
String sql="select * from blog";
sql+=" limit "+(page*pagesize-pagesize)+","+pagesize;
Blog[] blog=test.getInfo(sql,page,pagesize);
//将数据拼接成json字符串
StringBuffer strbuffer=new StringBuffer();
//ligerUI grid接受的json格式是{"Rows":[],"Total":""}
strbuffer.append("{\"Rows\":[");
for(int i=0;i<blog.length;i++){
strbuffer.append("{\"title\":").append("\"" + blog[i].getTitle() + "\"},");
}
strbuffer.replace(strbuffer.length()-1, strbuffer.length(), "");
strbuffer.append("],").append("\"Total\":").append("\""+total+"\"").append("}");
PrintWriter out=response.getWriter();
out.write(strbuffer.toString());
out.close();
} public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request,response);
}
}
运行结果(默认样式可以改,具体参照ligerUI API):
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlwAAADlCAIAAAAJJL5zAAAYAElEQVR4nO2d73MTZ2KA939ob6b3odMv6Uw/4Fwx0NqaSdLJJZMfFy7xhPrABJIad6FNaMZJSSbHjQ8KCWDjei81ELCDHWSMCRgRA+KH7SCIa2JCzsS4JEEEO4SEJE0T5mboTUvP6oddSbvSSlrJst73XT/PPB/slYRWK7/7aN9dJVr02/9J8cPuI6fm/lXkz3/8fvmfjN77o7Gf/vHY/X80eu+PTv7Zj4f++Vfp91fIlzoHqjfvy+ILu/s/+uJ3wtezYPsPvxBqeyiL/aHVn9z4T+HrKYmvX3osi8JXDxFLr5bphuFte0783XMnq5f1L142tO614W17xj+8Knx1p+kHn341eP7j/vf/I5PvXbx24crXl67fEr6q03mBp86NZ1L1FzgTkkNETJgxioiIiLNNooiIiGhJFBERES2JIiIioiVRREREtNTeHhhFRETEtwdGtZ39XyM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