extremecomponents组件使用
异常代码如下:TableTag Problem:
javax.servlet.jsp.JspException: TableTag.doAfterBody() Problem:
java.lang.Exception: You need to specify the totalRows (as an Integer) to use the org.extremecomponents.table.callback.LimitCallback.
页面的内容为:
<ec:table
items="resultList"
var="item"
retrieveRowsCallback="org.extremecomponents.table.callback.LimitCallback"
action="http://localhost:8080/public/buy.action"
imagePath="${pageContext.request.contextPath}/themes/default/images/table/*.gif"
width="100%"
rowsDisplayed="10"
showStatusBar="false"
styleClass="eXtremeTable_info"
filterable="false"
sortable="false">
<ec:row highlightRow="true">
<ec:column property="requiresubject" title="求购名"/>
<ec:column property="buycontent" title="要求"/>
<ec:column property="money" title="价格"/>
<ec:column property="buytime" title="求购日期"/>
</ec:row>
</ec:table>
怎么回事,我的数据库里有数据啊,各位帮帮忙
------解决方案--------------------我是这么用的:
jsp:
<div align="center">
<ec:table items="resultList" var="item" retrieveRowsCallback="limit"
filterRowsCallback="limit" sortRowsCallback="limit"
action="${pageContext.request.contextPath}/jsp/vibrationphone/vibrationPhoneAction.do?method=list"
title="查询结果" showStatusBar="true" sortable="false">
<ec:row highlightRow="true">
<ec:column property="vibrationPhone" title="电话号码" styleClass="centercol" />
<ec:column property="vibrationType" title="类型" styleClass="centercol" />
<ec:column property="serNum" title="轮振顺序" styleClass="centercol" />
<ec:column property="name" title="操作" styleClass="centercol"><a href="javascript:update(${item.id})">修改</a> <a href="javascript:if(confirm('确定要删除吗?')){del('${item.id}')}">删除</a></ec:column>
</ec:row>
</ec:table>
</div>
action.do
public ActionForward list(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
VibrationPhoneForm vibrationPhoneForm = (VibrationPhoneForm) form;
try {
String subscriberId=vibrationPhoneForm.getSubscriberId();
List list=getLogicDaoServiceInter().findVibrationPhone(subscriberId);
String dc = request.getParameter("ec_p");
if (dc == null
------解决方案-------------------- dc.equals(""))
dc = "1";
vibrationPhoneForm.setCurrPageNum(dc);
/**
*
* 首先需要创建一个Limit
*/
String tableId = "";
Context context = new HttpServletRequestContext(request);
LimitFactory limitFactory = new TableLimitFactory(context,