不显示删除回复显示所有回复显示星级回复显示得分回复 struts2 多行数据提交问题 action该如何编写

qianlong_nn 2010-10-12 02:10:34
<table id="formgrid" style="width:100%;border:0px; cellpadding:0px; cellspacing:0px">
<thead>
<tr>
<th class="box"><input type="checkbox" class="checkAll"/></th>
<th class="locationCode">编号</th>
<th class="locationName">名称</th>
<th class="kilometre">路程</th>
<th class="urbanDistrictFlag">是否为市区</th>
</tr>
</thead>
<tbody>
<s:iterator value="page.result" status="row">
<tr class=row_"${row.index}">
<td class="checkbox"><input type="checkbox" name="items" value="${id}"/><input type="hidden" name="platFormCod" value="${platFormCod}"/></td>
<td class="locationCode"><input type="text" name="locationCode" value="${locationCode}"/></td>
<td class="locationName"><input type="text" name="locationName" value="${locationName}"/></td>
<td class="kilometre"><input type="text" name="kilometre" value="${kilometre}"/></td>
<td class="urbanDistrictFlag"><input type="text" name="urbanDistrictFlag" value="${urbanDistrictFlag}"/></td>
</tr>
</s:iterator>
<c:if test="page.result ==null">
<tr><td>货运地点中没有数据</td></tr>
</c:if>
</tbody>
</table>
请教各位前台这么写对吗
...全文
35 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ltandfyy 2010-10-12
  • 打赏
  • 举报
回复
这样回显或提交时有问题吧,page.result是个List?取出的时候是一个个的对象是吧?
即要显示又要提交应该写成:
${page.result[%{row.index}].platFormCod}
我还没试过这样写在EL表达式里行不行,不行的话换成Struts标签:
<s:textfield name="page.result[%{row.index}].locationCode"></s:textfield>
qianlong_nn 2010-10-12
  • 打赏
  • 举报
回复
strut2属性List接收
Elim-Zhang 2010-10-12
  • 打赏
  • 举报
回复
应该没错,怎么,有什么问题吗

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧