从数据库查询出数据然后赋值给list,到页面遍历显示到table里的<html:text>里,然后可以在<html:text>里对数据进行修改,点击提交按钮需要把修改后的值回传给list,求高手帮忙!!!!
<logic:notEmpty name="Form" property="list">
<logic:iterate id="list" name="Form" property="list">
<tr>
<td nowrap="nowrap">
<html:text name="list"property="grantDate" size="10" maxlength="10" />
</td>
<td>
<html:text name="list" property="seqNo" size="3" styleClass="num" maxlength="3" />
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
<logic:notEmpty name="Form" property="list">
<logic:iterate id="list" name="Form" property="list">
<tr>
<td nowrap="nowrap">
<html:text name="list"property="grantDate" size="10" maxlength="10" />
</td>
<td>
<html:text name="list" property="seqNo" size="3" styleClass="num" maxlength="3" />
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
点击修改。跳转根据ID查询的action。把查询到的对象返回到一个jsp
jsp有值了,修改原始数据后,提交。跳转到修改action。
修改成功,跳转第一个查询action.
<%List list = myService.fun()%>
或者用SESSION【不好的用法】页面把LIST到ACTION?
这个, 很少用到。一般都是JSON或者XML, 表单数据传递到ACTION。
朋友你现在解决了没?我现在也遇到和你一样的问题,代码写的很乱。那个 logic:iterate 里面 我是这样弄的 <td>
<b> <input type="text" name="selectitem1"
value="<bean:write name="viewUser" property="id"/>" />
</b>
</td>
也不知道对不 然后 在jsp中把action里面那个list数据一行行遍历出来。 希望有哪位高手,能给个具体的代码啦。