数据库分页回调无效

yczhaomin 2007-05-21
今天尝试将项目中的列表使用基于数据库的分页用ECSIDE来实现显示.郁闷的是一下午都没搞出来.只显示第一次的结果.当点下一页.我跟踪到ACTION中.发现我的查询都做了.也取到了我需要的数据.但在页面就是无法显示.郁闷到顶了!还望大家帮我看下.
具体代码如下:
ACTION:
public class LoginAction extends Action {
private static int DEFAULT_PAGE_SIZE = 10;
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
UserDAO userDAO=new UserDAO();
String cTableId=LimitUtil.getTableId(request);
int totalRows=0;
try {
//这是得到列表的所有记录行.select count(*) from my_table
totalRows = userDAO.getAllUserInfoNumber();
} catch (Exception e1) {
e1.printStackTrace();
}
//构造LIMIT对象
Limit limit=LimitUtil.getLimit(request, cTableId, totalRows, DEFAULT_PAGE_SIZE);
//利用PAGEBEAN来实现数据库的分页.用的是存储过程来实现分页
    PageBean page=new PageBean();  
    page.setPageSize(limit.getCurrentRowsDisplayed());
    page.setPage(limit.getPage());
    page.setCount(totalRows);
     List list=null;
try {
list = userDAO.getUser(page);
} catch (Exception e) {
e.printStackTrace();
}
request.setAttribute("totalRows", new Integer(page.getCount()));
    request.setAttribute("userlist", list); 
    System.out.println("list.size=="+list.size());
    return mapping.findForward("userlist");
}
JSP:
<link rel="stylesheet" type="text/css" href="<%=webapp %>/common/css/ecside_style.css" /> 
<link rel="stylesheet" type="text/css" href="<%=webapp %>/common/css/ecside_simple.css"/> 
<link rel="stylesheet" type="text/css" href="<%=webapp %>/common/css/td_style_ec.css"/>
<script language="javascript" src="<%=webapp %>/common/js/ecside.js"></script> 
<script language="javascript" src="<%=webapp %>/common/js/prototype_mini.js"></script>  
<script language="javascript" src="<%=webapp %>/common/js/ecside_msg_gbk_cn.js"></script>
<script language="javascript" src="<%=webapp %>/common/js/ecside_msg_utf8_cn.js"></script>

<ec:table items="userlist" var="user"  
xlsFileName="用户列表.xls"
csvFileName="用户列表.csv"
action="${pageContext.request.contextPath}/login.do" 
title="用户列表"   
width="100%"   
classic="true" 
rowsDisplayed="10"
pageSizeList="10,20,all"
retrieveRowsCallback="org.extremecomponents.table.callback.LimitCallback"

>

<ec:row onclick="" > 
    <ec:column width="50" property="_0" sortable="false" title="序号" value="${GLOBALROWCOUNT}" calc="total" calcTitle="总计:" ></ec:column>
<ec:column width="80" property="userRole" title="角色"  calc="total" calcTitle="总计:" /> 
    <ec:column width="100"           property="userName" title="用户名" ><a href="">${pageScope.user.userName}</a></ec:column> 
    <ec:column width="100" property="passwd" title="密码"  /> 
    <ec:column width="120" property="email" title="电子信箱" calc="total" calcTitle="总计:" viewsDenied="html" /> 
    <ec:column width="70" property="gender" sortable="false" title="性别" filterCell="droplist"  /> 

</ec:row>
fins 2007-05-22
无法显示是指什么? 能否说说具体现象
以及你的 应用服务器是什么  web.xml里是否正确配置了过滤器
yczhaomin 2007-05-22
用的struts+TOMCAT
无法显示的情况是就停在第一页的界面.其实在ACTION中已经取得了新的数据.
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<filter>
<filter-name>ecsideExport</filter-name>
<filter-class>org.ecside.filter.ECSideFilter</filter-class>
<init-param>
<param-name>useEasyDataAccess</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>useEncoding</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ecsideExport</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <taglib>
  <taglib-uri>/tld/ecside</taglib-uri>
  <taglib-location>/WEB-INF/tld/ecside.tld</taglib-location>
  </taglib>
</web-app>

Global site tag (gtag.js) - Google Analytics