jQuery MiniUI

标题: 分页失败 [打印本页]

作者: 邓冰冰    时间: 2015-12-14 11:31:08     标题: 分页失败




小弟要展现的视图对应数据库有几万条记录 所以需要分页查询 jsp代码如下
         <div id="unit-order" class="mini-datagrid" allowResize="false"
                   url="${pageContext.request.contextPath}/gridmgt/cfgSysDbAction.do?method=showByViewName"  
                idField="id" multiSelect="true"  style="width:100%;height:100%;" showPager="true"
                 allowCellEdit="true" allowCellSelect="true" multiSelect="true"
                selectOnLoad="true" ajaxOptions="{contentType:'application/x-www-form-urlencoded; charset=utf-8'}"  pageSize="20">



java DAO代码如下
        public List getPlantOrder(int pageIndex,int pageSize) {
                       
        int start=(pageIndex)*pageSize+1;
        int end=(pageIndex+1)*pageSize;
        System.out.println("start:"+start+" , end :"+end);       
                String sql="select * from (select ROWNUM rn,v.PDATE ,v.UNITNAME NAME,v.VALUE,v.PLANORDER"+
                "  from ops_osb.v_unit_planorder v) result "+
                "  where result.rn between ? and ?";

                List list= getJdbcTemplate().queryForList(sql,start,end);
                System.out.println("机组排序表查出条数:"+list.size());
                return list;

可是它最后真的只给我返回20条数据展现出来   没有分页  如下图显示 求指导

[attach]6950[/attach]

作者: felt    时间: 2015-12-14 11:59:10

http://www.miniui.com/docs/tutorial/datagrid.html
需要返回{data:[],total:""}这样结构的数据,total字段处理的具体分页数量
作者: 邓冰冰    时间: 2015-12-14 17:33:12

felt 发表于 2015-12-14 11:59
http://www.miniui.com/docs/tutorial/datagrid.html
需要返回{data:[],total:""}这样结构的数据,total字 ...

谢谢 已经解决




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2