I have a problem. I have an entity that has many Set into, and i want to generate a jsp form that can bind these sets. The problem is:
i can't set the path of the form:input tag.
Data:
JspCode:public class Implant implements java.io.Serializable { // Fields private Integer id; private Set analyzers = new Set(0); //with some attributes like model etc private Set trainings = new HashSet(0); //getters and setters omitted }
the big problem is i cannot generate the correct path for the form:input!! i cannot get the array index because is not an array. Because the hibernate mapping, i cannot change the Set to ArrayList, or i get mappingexceptions.Code:<c:forEach items="${implant.analyzers}" varStatus="loop" var="item"> <c:choose> <c:when test="${item.id eq 1}"> <div id="implant.analyzers${loop.index}.wrapper" class="hidden"> </c:when> <c:otherwise> <div id="implant.analyzers${loop.index}.wrapper"> </c:otherwise> </c:choose> <form:input path="implant.analyzers[${loop.index}].model" /> //HERE IS THE ERROR <form:input path="implant.analyzers[${loop.index}].privateaddress" /> //HERE IS THE ERROR
So, there is a way to do this with Sets?
Thank you![]()


Reply With Quote
