Add a new item to the list box printed on the jsp page using Spring form: input
I have a class called "Menu". It has a list of objects called VoceMenu
public class Menu implements Serializable{
private List<VoceMenu> voceMenuList;
}
public class VoceMenu implements Serializable{
private String descrizione;
}
I am printing voceMenuList on jsp page using Spring form tag to be able to change values
...
<form:form modelAttribute="menu">
<c:forEach items="${menu.voceMenuList}" varStatus="counter">
id<form:input path="voceMenuList[${counter.index}].descrizione"/>
...
On the same jsp page, I would like to allow the user to add a new VoceMenu. But in this case, I cannot figure out what to write inside the attribute path
.
+3
source to share
No one has answered this question yet
See similar questions:
or similar: