[ECSide] 关于分页的问题retrieveRowsCallback="process"

haray 2009-07-17
<ec:table items="menuList" var="record" useAjax="true"
doPreload="false"
action="${pageContext.request.contextPath}/sysManager/menuManager.jsp"
title="菜单列表" xlsFileName="菜单列表.xls" pdfFileName="菜单列表.pdf"
maxRowsExported="10000" pageSizeList="5,20,50,100,all"
rowsDisplayed="5" editable="false" retrieveRowsCallback="process"
sortable="true" resizeColWidth="true" classic="true"
rowsDisplayed="10" filterable="false" width="100%" minHeight="280"
height="280px">
<ec:row recordKey="${record.prvid}">
<ec:column property="_0" title="选择" width="40">
<input type="radio" id="radio_${GLOBALROWCOUNT}"
name="checkedRadio" value="${record.prvid}">
</ec:column>
<ec:column width="40" property="_1" title="序号"
value="${GLOBALROWCOUNT}" />
<ec:column width="100" property="prvid" title="菜单编号" />
<ec:column width="120" property="name" title="菜单名" />
<ec:column width="200" property="url" title="目标地址" />
<ec:column width="120" property="remark" title="详细描述" />
<ec:column width="50" property="vieworder" title="顺序" />
<ec:column width="50" property="status" title="状态"
mappingItem="STATUS_MAP" />
<ec:column width="100" property="_2" title="执行操作">
<a href="/rights_man.action?method=delete&ID=${record.prvid}">
<img src="<%=webapp%>/ecside/images/gird/update.gif" border="0"
width="50" title="移除">移除 </a>
</ec:column>

</ec:row>

</ec:table>

分页时,点击第二页时,数据就没有了.
haray 2009-07-17
通过大量查询资料,终于得到解决,因为我用的是struts2,所以数据的存放问题很重要,不能用request.setAttribute("menuList", list);而要以这种方式才能实现基于java的分页request.getSession().setAttribute("menuList", list);
即时把成果分享,以便有人走更多的弯路.
Global site tag (gtag.js) - Google Analytics