<%@ page import="org.helpsoft.contract.dto.*" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page contentType="text/html; charset=gb2312"%>
<%
Ht dto[] = (Ht[]) request.getAttribute( "result" );
%>
<table width="864" border="1" class="bodyTable">
<tr>
<td>合同编码</td>
<td>甲方代理人编码</td>
<td>甲方编码</td>
<td>签署地点</td>
<td>乙方</td>
<td>乙方代理人</td>
<td>甲方签字日期</td>
<td>乙方签字日期</td>
<td>项目名称</td>
<td>合同内容</td>
</tr>
<%
for (int i=0; i<dto.length; i++)
{
Ht value = dto[i];
%>
<tr>
<td><a href="HtFindByPrimaryKeyResults.do?htbm=<%= value.getHtbm() %>&crudMethod=view"><%= value.getHtbm() %></a></td>
//“?”后面开始设置参数名与参数值。htbm为参数名,<%= value.getHtbm() %>为参数值;“&”后可以在写参数名:crudMethod为参数名,view为String型的参数值。“.do”以前的HtFindByPrimaryKeyResults为struts-config.xml文件中对应的actiong类。
<td><%= value.getJfdlrbm() %></td>
<td><%= value.getJfbm() %></td>
<td><%= value.getQsdd() %></td>
<td><%= value.getYf() %></td>
<td><%= value.getYfdlr() %></td>
<td><%= value.getJfqzrq() %></td>
<td><%= value.getYfqzrq() %></td>
<td><%= value.getXmmc() %></td>
<td><%= value.getHtnr() %></td>
<td>
<a href="HtFindByPrimaryKeyResults.do?htbm=<%= value.getHtbm() %>&crudMethod=update">编辑</a>
<html:form action="HtFindByPrimaryKeyResults.do" > //HtFindByPrimaryKeyResults是struts-config.xml文件中对应的actiong类
<html:hidden property="crudMethod" value="update"/>
// hidden 是隐藏域,<html:hidden />标签可以进行页面传值。property属性中的crudMethod为form类中定义的参数名,value中的update为赋给本页面crudMethod参数的值。也就是说参数名为crudMethod的值等于update。
<html:hidden property="htbm" value="<%= value.getHtbm() %>"/>
<input type="submit" value="编辑"/>
</html:form>
</td>
<td>
<a href="HtSave.do?htbm=<%= value.getHtbm() %>&crudMethod=delete">删除</a>
<html:form action="HtSave.do" >
<html:hidden property="crudMethod" value="delete" />
<html:hidden property="htbm" value="<%= value.getHtbm() %>"/>
<html:submit value="删除"/>
</html:form>
</td>
</tr>
<%
}
%>
</table>