码迷,mamicode.com
首页 > 编程语言 > 详细

springmvc 之 easyUI开发商城管理系统

时间:2017-10-26 23:06:07      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:标题   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.树状类别显示

 

springmvc 之 easyUI开发商城管理系统

标签:标题   url   管理系   option   路径   实体类   aot   field   ati   

原文地址:http://www.cnblogs.com/ssjifm/p/7739187.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!