I am displaying values from a set on a bean called AttributeDefinition which has a Set of ValidValues. I am able to display the set and change the values using the JSP below:
<c:forEach items="${attributeDefinition.validValues}" var="validValue" varStatus="validValueRow">
<form:hidden path="validValues[${validValueRow.index}].id"/>
<tr>
<td><form:input path="validValues[${validValueRow.index}].value"/></td>
</tr>
</c:forEach>
However, I want to be able to add an element to this set and have tried a few things and looked at the documentation, but I am unsure if this is possible with a Set, or if I have to do some conversion between a LazyList and my Set. Can someone let me know how to achieve this in the jsp and what code needs to be added to my controller? The Spring MVC documentation/book leave a lot to be desired.