我有和对象的字段是ArrayList:
@Expose
private Collection<CallFeatureAni> anis;
在表单中,我可以毫无问题地绘制值:
在HTML中,值用[]命名以表示数组:
<tr><td>
<input name="callFeature.anis[].id" value="1" type="hidden">
<input class="form-control" value="01152692150" name="callFeature.anis[].ani" type="text">
....
但是当我执行Submit命令时,出现以下错误:
org.springframework.beans.InvalidPropertyException: Invalid property 'anis[]' of bean class [beans.CallFeature]: Invalid index in property path 'anis[]'; nested exception is java.lang.NumberFormatException: For input string: ""