[ECSide] ecside结合struts2点翻页按钮没有反应

jwb590 2012-10-30
采用数据库分页,页面可以展现出数据,但是点翻页的按钮没有反应,一直提示“正在提交”,改变每页显示的行数的下拉框有效果。dao层代码
	try {
			conn = DBConnection.getConnection();
			StringBuffer sql = new StringBuffer();
			sql.append("select * from ( ");
			sql.append("select rownum ROWCOUNT,a.* from bs_service_kind_t a)   ");
			sql.append("where  rownum <= ?   ");
			sql.append("and  rowcount >= ?  ");
			ps=conn.prepareStatement(sql.toString());
			int i=1;
			ps.setInt(i++, endNum);
			ps.setInt(i++, beginNum);
			rs=ps.executeQuery();
			
			while(rs.next()){
				ServiceKindVo vo = new ServiceKindVo();
				vo.setService_kind(rs.getInt("service_kind"));
				vo.setService_name(rs.getString("service_name"));
				vo.setService_flag(rs.getInt("service_flag"));
				vo.setIf_open(rs.getInt("if_open"));
				vo.setMonth_fee_onoff(rs.getString("month_fee_onoff"));
				vo.setCredit_control(rs.getInt("credit_control"));
				vo.setLimit_control(rs.getInt("limit_control"));
				vo.setHave_call_limit(rs.getInt("have_call_limit"));
				vo.setPay_order(rs.getString("pay_order"));
				
				coll.addElement(vo);
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		finally
		{
		    DBConnection.Free(conn, ps, rs);
		}
		return coll;
	}


action的代码
public class ServiceKindAction extends ActionSupport {
	
		static int DEFAULT_PAGE_SIZE = 10;
	
	private ServiceKindDaoImpl dao = new ServiceKindDaoImpl();
	protected HttpServletRequest request; 

	@SuppressWarnings({ "deprecation", "unchecked" })
	@Override
	public String execute() throws Exception {
		HashMap map = new HashMap();
		request = (HttpServletRequest) ActionContext.getContext().get(org.apache.struts2.StrutsStatics.HTTP_REQUEST);
		int totalrow = RequestUtils.getTotalRowsFromRequest(request);
		if(totalrow <= 0){
			totalrow = dao.getServiceKindNum();
		}
		
		int[] rowStartEnd = RequestUtils.getRowStartEnd(request, totalrow, DEFAULT_PAGE_SIZE);
		ServiceKindColl coll = new ServiceKindColl();
		List restInfo = null;
		map.put("beginNum", String.valueOf(rowStartEnd[0]));
		map.put("endNum", String.valueOf(rowStartEnd[1]));
		coll = dao.getServiceKind(map);
		if(coll != null) {
        	restInfo = coll.getList();
        }
		Map session=ActionContext.getContext().getSession();
		session.put("list", restInfo);
		session.put("totalrow", new Integer(totalrow));

		return "success";
	}


jsp代码
   <ec:table xlsFileName="list.xls"
                        action="${pageContext.request.contextPath}/servicekind.action"
                        toolbarContent="navigation|pagejump|pagesize|export|extend|status"
                        items="list" var="record" rowsDisplayed="20" method="post" 
>
<ec:row tagAttributes="" highlightRow="true">
 <ec:column style="text-align:center;width:90px"
                                property="service_kind" title="地市"  
                                value="${record.service_kind}"></ec:column>
                             <ec:column style="text-align:center;width:90px"
                                property="service_name" title="号码"  
                                value="${record.service_name}"></ec:column>
                             <ec:column style="text-align:center;width:90px"
                                property="service_flag" title="用户号"  
                                value="${record.service_flag}"></ec:column>
                             <ec:column style="text-align:center;width:90px"
                                property="if_open" title="业务类型"  
                                value="${record.if_open}"></ec:column>
                             <ec:column style="text-align:center;width:90px"
                                property="month_fee_onoff" title="业务类型"  
                                value="${record.month_fee_onoff}"></ec:column> 
                             <ec:column style="text-align:center;width:90px"
                                property="credit_control" title="业务类型"  
                                value="${record.credit_control}"></ec:column>
                             <ec:column style="text-align:center;width:90px"
                                property="limit_control" title="业务类型"  
                                value="${record.limit_control}"></ec:column> 
                             <ec:column style="text-align:center;width:90px"
                                property="have_call_limit" title="业务类型"  
                                value="${record.have_call_limit}"></ec:column> 
                             <ec:column style="text-align:center;width:90px"
                                property="pay_order" title="业务类型"  
                                value="${record.pay_order}"></ec:column>   
     </ec:row>
</ec:table>


请老师们帮帮我吧!
Global site tag (gtag.js) - Google Analytics