It seems that you can also receive it with String [], but if you implement it with lazyList, it will be convenient to handle like PHP, right? That is.
SampleForm.java
public class SampleForm {
private List<String> valueList = ListUtils.lazyList(new ArrayList(), new Factory() {
public Object create() {
return new String();
}
});
public List<String> getValueList() {
return valueList;
}
public void setValueList(List<String> valueList) {
this.valueList = valueList;
}
}
sample.jsp
<form:input path="valueList[0]"/>
<form:input path="valueList[1]"/>
<form:input path="valueList[2]"/>
Recommended Posts