我有以下jsp,其中我可以选择添加和删除表的行,并且在表的每一行中,我必须填写选项并提交表单。
在动作类中,我如何检索我在 JSP 中填写的行的值,因为我在表中填写了不止一行?
这是我的 JSP:
<table id="fragmentTable" style="height: 100%; width: 100%">
<tr class="tableRow" style='height: 5%;'>
<td class='' style='position: absolute; left: 75%;'>
<button value="Add Row" type="button" onclick="return addRow1();">Add Row</button>
<button value="Delete Row" type="button" onclick="return deleteRow ('dataTable')">Delete Row</button>
</td>
</tr>
<tr>
<td colspan="2"><br><br>
<table id="dataTable" border="1" width=100% height=30% class='blueBorder'>
<thead>
<tr class='rowHeader'>
<th width='14%'>Select</th>
<th width='14%'>Opening Brace</th>
<th width='14%'>Parameter</th>
<th width='14%'>Relational Operator</th>
<th width='14%'>Value</th>
<th width='15%'>Closing Brace</th>
<th width='15%'>Logical Operator</th>
</tr>
</thead>
<tbody>
<tr class='rowData' id=1>
<td>
<s:checkbox theme="simple" id="sel" name="GRF_FRAGID" value="false" /></td>
<td ><s:select headerKey="-1" headerValue="Select" list="#{'1':'(', '2':'((','3':'(((','4':'((((','5':'((((('}" name="GRF_OPNGBRCES" /></td>
<td>
<s:select label="Mode" headerKey="-1" headerValue="Select" list="#{'1':'=', '2':'!='}"
name="GRF_OP" />
</td>
<td>
<s:textfield name="Country"/>
</td>
</tr>
</tbody>
</table>