2007年8月8日
<
ec:table
items
="itemList"
var
="item"
action
="${pageContext.request.contextPath}/query.do"
retrieveRowsCallback
="limit"
filterRowsCallback
="limit"
sortRowsCallback
="limit"
>
<
ec:exportXls
fileName
="CouponList.xls"
tooltip
="导出 Excel"
/>
<
ec:row
>
<
ec:column
property
="rowcount"
cell
="rowCount"
sortable
="false"
title
="序号"
/>
<
ec:column
property
="id"
title
="编号"
/>
<
ec:column
property
="type"
title
="种类"
>
${typeMap[item.type]}
</
ec:column
>
<
ec:column
property
="name"
title
="名称"
/>
<
ec:column
property
="beginDate"
title
="开始时间"
cell
="calendar"
format
="date"
/>
<
ec:column
property
="endDate"
title
="结束时间"
cell
="calendar"
format
="date"
/>
<
ec:column
property
="state"
title
="状态"
>
${statusmap[coupon.status]}
</
ec:column
>
<
ec:column
property
="edit"
title
="操作"
sortable
="false"
viewsAllowed
="html"
style
="width: 56px;text-align: center"
>
<
A
href
="<c:url value="
/security/user.do?method
=selectRoles&userId=${user.id}"
/>
">
<
img
src
="<c:url value="
/images/icon/16x16/manage.gif"
/>
" border="0"/>
</
A
>
</
ec:column
>
</
ec:row
>
</
ec:table
>
其中:
retrieveRowsCallback="limit" filterRowsCallback="limit" sortRowsCallback="limit" 指定了callback函数 limit
在controller 中的处理:
/**
* 列表查看
*/
protected
void
onList(HttpServletRequest request,HttpServletResponse response, ModelAndView mav)
throws
Exception
{
Limit limit
=
ExtremeTablePage.getLimit(request);
Map map
=
WebUtils.getParametersStartingWith(request,
"
search_
"
);
Page page
=
service.queryForPage(map,ExtremeTablePage.getSort(limit),limit.getPage(), limit.getCurrentRowsDisplayed());
mav.addObject(
"
itemList
"
, page.getResult());
mav.addObject(
"
totalRows
"
,page.getTotalCount());
}
|
|
| | 日 | 一 | 二 | 三 | 四 | 五 | 六 |
|---|
| 29 | 30 | 31 | 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | 9 | 10 | 11 | | 12 | 13 | 14 | 15 | 16 | 17 | 18 | | 19 | 20 | 21 | 22 | 23 | 24 | 25 | | 26 | 27 | 28 | 29 | 30 | 31 | 1 | | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|
公告
版权声明:本博客所有文章仅适用于非商业性转载,并请在转载时注明出处及作者的署名。
天气预报
常用链接
留言簿(10)
随笔分类
随笔档案
相册
收藏夹
博客
文档
站点
论坛
搜索
积分与排名
最新评论

阅读排行榜
评论排行榜
|
|