<%@ include file="/html/common/common.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=GBK"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script type="text/javascript" src="${ctx}/dwr/interface/lmshzService.js"></script>
<title></title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="${ctx}/css/main.css" rel="stylesheet" type="text/css">
<script type="text/javascript"> function doEdit(id){
$('originalPK').value=id;
document.forms[0].action="${ctx}/phoneBook!editPage.action";
document.forms[0].target="mainFrame";
document.forms[0].submit();

// window.parent.location="${ctx}/?gxtDepartment.departmentId="+id;
} function doDel(bookId){
if(confirm("确认删除该记录吗?")){
$('originalPK').value=bookId;
lmshzService.getTxl(bookId,checkDbCode);
}
}
function checkDbCode(value){
if(value==1){
alert("该通讯录下面还存在用户,不能删除!");
}else{
document.forms[0].action="${ctx}/phoneBook!delete.action";
document.forms[0].submit();
//window.location="${ctx}/yxshz!del.action?gxtDepartment.departmentId="+id;
} }
function unload(){
if(document.forms[0].message.value !=""){
     alert(document.forms[0].message.value);
     document.forms[0].message.value = "";    
    }
}
</script>
</head><body scroll="yes" onload="loadTable();unload()"><s:form name="yxshz" action="yxshz!init" method="post" theme="simple">
<s:hidden name="page.totalCount" />
<s:hidden name="originalPK" value=""/>
<s:hidden name="message" />
<s:hidden name="object.ptName" /><table width="100%"  border="0" cellspacing="1" cellpadding="3">
  <tr bgcolor="EFF6FE">
        <td background="${ctx}/image/main/bg06.jpg" bgcolor="EFF6FE" class="bg04">办公号码</td>
    <td background="${ctx}/image/main/bg06.jpg" bgcolor="EFF6FE" class="bg04">录入人</td>
    <td background="${ctx}/image/main/bg06.jpg" bgcolor="EFF6FE" class="bg04">录入时间</td>
    <td background="${ctx}/image/main/bg06.jpg" bgcolor="EFF6FE" class="bg04">操作类型</td>
  </tr>
  <s:iterator value="%{page.tableList}" status="stuts" id='cell'>//请教page.tableList是哪里来的??
<tr  bgcolor=<s:if test="#stuts.odd">"#FFFFFF"</s:if><s:else>"#E0EBF6"</s:else>>
  <td height="27" width="10%" ><s:property value="schoolName"/></td>
<td height="27" width="10%" ><s:property value="bookName"/></td>
<td height="27" width="5%" ><s:property value="version"/></td>
<td height="27" width="5%" ><s:property value="typeName"/></td>
<td height="27" width="10%" ><s:property value="deptName"/></td>
 format="yyyy/MM/dd HH:mm:ss" /></td>
<td height="27" width="10%" ><s:property value="opt_type_name"/></td>
</tr>
</s:iterator>
</table></s:form>
</body>
</html>

解决方案 »

  1.   

     <s:iterator value="%{page.tableList}" status="stuts" id='cell'>//请教page.tableList是哪里来的??
      

  2.   

    java代码里面提供的。跟ctx类似。只是page对象的 tableList 属性是一个list对象
      

  3.   

    这个page.tableList,请注意page是在你的Action在中声明的一个变成,如果我猜测的没错的话应该是Page page=new Page()而这个Page类里又有个List tableList变量所以在JSP页面里,用page.tableList就可以访问得到那个List了我这样解释你该懂的吧!