标签:标题 url 管理系 option 路径 实体类 aot field ati
1.分页
url:controller的路径
pageSize:每页显示的行数 ---后台参数名(rows)
会向后台传递一个 page参数,表示当前页.---后台参数名(page)
controller中:
@RequestMapping("/list") @ResponseBody public EasyUIPageItem itemPage(int page,int rows) { EasyUIPageItem myEasyUIPageItem = itemService.listByPage(page,rows); return myEasyUIPageItem; }
后台接收两个参数 返回一个实体类为(变量名必须为total,和rows)
class EasyUIPageItem{
long total;
list<?> rows;
}
的json对象
前端table代码如下
<thead> <tr> <th data-options="field:‘ck‘,checkbox:true"></th> <th data-options="field:‘id‘,width:60">商品ID</th> <th data-options="field:‘title‘,width:200">商品标题</th> <th data-options="field:‘cid‘,width:100">叶子类目</th> <th data-options="field:‘sellPoint‘,width:100">卖点</th> <th data-options="field:‘price‘,width:70,align:‘right‘,formatter:TAOTAO.formatPrice">价格</th> <th data-options="field:‘num‘,width:70,align:‘right‘">库存数量</th> <th data-options="field:‘barcode‘,width:100">条形码</th> <th data-options="field:‘status‘,width:60,align:‘center‘,formatter:TAOTAO.formatItemStatus">状态</th> <th data-options="field:‘created‘,width:130,align:‘center‘,formatter:TAOTAO.formatDateTime">创建日期</th> <th data-options="field:‘updated‘,width:130,align:‘center‘,formatter:TAOTAO.formatDateTime">更新日期</th> </tr> </thead>
2.树状类别显示
标签:标题 url 管理系 option 路径 实体类 aot field ati
原文地址:http://www.cnblogs.com/ssjifm/p/7739187.html