Spring MVC下 bootStrap服务器分页代码
程序员文章站
2024-03-04 13:01:35
因为spring 对于ajax直接返回对象,到了web页面就转换成json 所以不需要使用json转换封装可以直接使用
因为spring 对于ajax直接返回对象,到了web页面就转换成json 所以不需要使用json转换封装可以直接使用
<span style="white-space:pre"> </span>@requestmapping(value = "/searchlist.cqzk") @responsebody public bootpage<illegalparkinfo> search(bootpage<illegalparkinfo> page,httpservletrequest request,httpservletresponse response,httpsession session) throws servletexception,ioexception,runtimeexception{ object obj=session.getattribute("page"); bootpage<illegalparkinfo> pagger=(bootpage<illegalparkinfo>) obj; pagger.setsearchfield(page.getsearchfield()); pagger.setsearchtext(page.getsearchtext()); illegalparkinfoservice.bootstrapsearch(pagger); session.setattribute("page", pagger); return pagger; }
对应的bootpage类
public final class bootpage<t> { protected int total; protected list<t> rows; protected int limit=10; protected int offset = 0; protected string order ="asc" ; protected string searchtext=null; protected string searchfield=null; public int gettotal() { return total; } public void settotal(int total) { this.total = total; } public list<t> getrows() { return rows; } public void setrows(list<t> rows) { this.rows = rows; } public int getlimit() { return limit; } public void setlimit(int limit) { this.limit = limit; } public int getoffset() { return offset; } public void setoffset(int offset) { this.offset = offset; } public string getorder() { return order; } public void setorder(string order) { this.order = order; } public string getsearchtext() { return searchtext; } public void setsearchtext(string searchtext) { this.searchtext = searchtext; } public string getsearchfield() { return searchfield; } public void setsearchfield(string searchfield) { this.searchfield = searchfield; } }
以上所述是小编给大家介绍的spring mvc下 bootstrap服务器分页代码,希望对大家有所帮助
推荐阅读
-
Spring MVC下 bootStrap服务器分页代码
-
Spring Data + Thymeleaf 3 + Bootstrap 4 实现分页器实例代码
-
Spring Data + Thymeleaf 3 + Bootstrap 4 实现分页器实例代码
-
Angular+Bootstrap+Spring Boot实现分页功能实例代码
-
bootstrap-table实现服务器分页的示例 (spring 后台)
-
bootstrap table表格插件之服务器端分页实例代码
-
Angular+Bootstrap+Spring Boot实现分页功能实例代码
-
bootstrap-table实现服务器分页的示例 (spring 后台)
-
bootstrap table表格插件之服务器端分页实例代码