用struts标签在文本框中显示值的问题

来源:百度知道 编辑:UC知道 时间:2024/05/13 08:55:36
先看jsp代码:

<html:form action="ModifyCustomer.do">
<logic:iterate id="customerId" name="listCustomerInfo" offset="0" length="1">
<html:text property="newCustomerId" value="这里怎么写"/>
</logic:iterate>
</html:form>

“listCustomerInfo”是ArrayList,“customerId”是其中的一个值,我要将这个值显示在文本框中,要怎么做?

谢谢。

<html:text name="customerId" property="customerId"/>
不过这样的话,那个text框的名字就是customerId了。
如果你要text框的名字是newCustomerId的话,可以这样写
<input type="text" name="newCustomerId" value="<bean:write name='customerId' property='customerId'/>"> ,不能是你那种写法,标签里面不能嵌套标签

value=<bean:write name="customerId" property="customerId" filter="false"/>