【发布时间】:2011-11-09 08:13:52
【问题描述】:
在我的 Struts1.3 应用程序中,我有一个 Jsp 页面,我在点击该超链接时有一个超链接,我在支票簿中显示来自数据库的所有记录 mycode 是为了显示所有值如下
<table width="932" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#E9E9E9">
<%for (int i = 0; i < landlordList.size(); i++) {%>
<tr>
<td width="50" align="left">
<table width="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="20"><label>
<html:checkbox value="<%=landlordList.get(i).getLandlordId()%>" property="landlordId"
name="ExporterForm" styleId="landlordId"/>
</label>
</td>
</tr>
</table>
</td>
<td class="landlord_name"><%=landlordList.get(i).getLandlordname()%></td>
</tr>
<%}%>
</table>
并且property="landlordId" 在我的操作类中被定义为String[]。我还有一个list2,其中包含我查询的几条记录。如果landlordList 包含list2 的任何记录,我如何将list2 与landlordList 进行比较,然后将与这些记录对应的标记为checked。请帮帮我。
【问题讨论】: