1.在Action中定义,List<Product>属性(Product为pojo)
2.jsp页面中:
<s:iterator value="new int[3]" status="stat">
<tr>
<td><s:textfield name="%{'productList['+#stat.index+'].name'}"/></td>
<td><s:textfield name="%{'productList['+#stat.index+'].price'}"/></td>
<td><s:textfield name="%{'productList['+#stat.index+'].dateOfProduction'}"/></td>
</tr>
</s:iterator>
其中productList为Action的List属性名,name,price,dateOfProduction为Product的属性
3.定义属性文件(与Action同一目录),Action名称-converstion.properties,格式为:Element_属性名=Product