此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【lix2006】截止到2008-07-08 13:38:04的历史汇总数据(不包括此帖):
发帖的总数量:0                        发帖的总分数:0                        每贴平均分数:0                        
回帖的总数量:0                        得分贴总数量:0                        回帖的得分率:0%                       
结贴的总数量:0                        结贴的总分数:0                        
无满意结贴数:0                        无满意结贴分:0                        
未结的帖子数:0                        未结的总分数:0                        
结贴的百分比:---------------------结分的百分比:---------------------
无满意结贴率:---------------------无满意结分率:---------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html

解决方案 »

  1.   

    index.jsp内容:  <body>
        <html:link href="PaginationAction.do">点击查看分页</html:link>
      </body>terrirories.jsp内容:
    <%@ page language="java" pageEncoding="ISO-8859-1"%><jsp:directive.page import="POJO.Territories"/>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
    prefix="bean"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
    prefix="html"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
    prefix="logic"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
    prefix="tiles"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-template"
    prefix="template"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested"
    prefix="nested"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html:html locale="true">
    <head>
    <html:base /> <title>terrirories.jsp</title> <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    --></head><body>
    <logic:notEmpty name="data">
    <table>
    <logic:iterate id="row" name="data">
    <tr>
    <td>
    <bean:write name="row" property="territoryId"></bean:write>
    </td>
    </tr>
    <tr>
    <td>
    <bean:write name="row" property="territoryDescription" />
    </td>
    </tr>
    <tr>
    <td>
    <bean:write name="row" property="regionId" />
    </td>
    </tr>
    </logic:iterate>
    </table>
    </logic:notEmpty>
    <%
    int pagecount = Integer.parseInt(request.getAttribute("count")
    .toString().intern());
    for (int i = 1; i <= pagecount; i++) {
    %>
    <a href="PaginationActon.do?pageNumber=<%=i%>"><%=i%>
    </a>
    <%
    }
    %>
    </body>
    </html:html>
      

  2.   

    为territoryId 这个属性提供getter方法
      

  3.   

    No getter method for property territoryId of bean row
      

  4.   

    No getter method for property territoryId of bean row 
    bean row好像有问题!territoryId 没有get方法!
      

  5.   


    <logic:iterate id="row" name="data"> 
    -------
    data是啥时加到request中去的,它里面存放的是啥呢也就是说row指向的是哪一个bean,这个bean的是否存在getTerritoryId ()方法
      

  6.   

    Action内容:
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response) {
    PaginationForm paginationForm = (PaginationForm) form;// TODO Auto-generated method stub
    String pageNumber=request.getParameter("pageNumber");
    String pageSize=request.getParameter("pageSize");
    int intPageNumber = 1;
    int intPageSize = 10;
    if (pageNumber!=null&&!pageNumber.equals("")) {
    intPageNumber = Integer.parseInt(pageNumber);
    }

    if (pageSize!=null&&!pageSize.equals("")) {
    intPageSize = Integer.parseInt(pageSize);
    }

    Sqlwork work = new Sqlwork();
    List list=Pagination.pagination(work.selecttable(), intPageNumber, intPageSize);
    request.setAttribute("data", list);
    request.setAttribute("count", Pagination.getCount());
    return mapping.findForward("terrirories");
    }
      

  7.   

    集合list里面放得有一个Territories Bean
      

  8.   

    Territories Bean面没有getTerritoryId ()这个方法