harry_m
Feb 9th, 2006, 12:17 PM
hi all,
i am new to spring mvc. i need some help on binding a DTO inside command to jsp. scenario is - i have an arraylist in command object that contains list of DTOs. they have some data like gender, title etc . i need to show these when form loads. user can change these values and i need to get them in my controller. so, binding shud be with DTOs inside arraylist.
i am able to display these values but when user changes, they are not getting reflected in controller.
here is code in jsp -
<c:forEach items="${command.arrListAdditionalPassengers}" varStatus="loopStatus" >
<spring:bind path="command.arrListAdditionalPassengers[${loopStatus.index}].ageGroup">
<input type=text value='<c:out value="${status.value}" />' />
</spring:bind>
<br>
</c:forEach>
Pls help.
Thanks in advance.
i am new to spring mvc. i need some help on binding a DTO inside command to jsp. scenario is - i have an arraylist in command object that contains list of DTOs. they have some data like gender, title etc . i need to show these when form loads. user can change these values and i need to get them in my controller. so, binding shud be with DTOs inside arraylist.
i am able to display these values but when user changes, they are not getting reflected in controller.
here is code in jsp -
<c:forEach items="${command.arrListAdditionalPassengers}" varStatus="loopStatus" >
<spring:bind path="command.arrListAdditionalPassengers[${loopStatus.index}].ageGroup">
<input type=text value='<c:out value="${status.value}" />' />
</spring:bind>
<br>
</c:forEach>
Pls help.
Thanks in advance.