private String threeTextfield[]={"","",""};jsp
public String[] getThreeTextfield() {
return threeTextfield;
}
public void setThreeTextfield(String[] threeTextfield) {
this.threeTextfield = threeTextfield;
}
<s:iterator value="threeTextfield" status="rowstatus" id="id">
<tr>
<td><s:textfield name="threeTextfield" value="%{id}" /></td>
</tr>
</s:iterator>
透過這樣的方式
優點是jsp的撰寫與後端的接收都快了不少
缺點是無法指定textfield的個數
沒有留言:
張貼留言