Hello,
I have a spring command object for my SimpleFormController. This object has few
string items and few List items as attributes. I am using JSTL in my
JSP page to populate the Lst box in view. I am using spring:bind tags to bind the command object attributes with view componenents. It works fine when we have all the attributes as String. But incase of List attributes, I do not see the spring binding happening correctly. This results the incorrect rendering of view with no items in the list.
I can see that the List is getting populated properly on Server side. But view is not able to display the same. Looks like the JSP code written by me is incorrect. Can someone provide hint or sample code for this scenario?
My sample JSP code is:
----------------------------
Dispatcher
Servlet Content:
----------------------------------
Controller class code:
--------------------------
When I print currentCity.cityId in JSP, it shows up blank. So looks like there is problem of binding the List item userBean.location. This is what I feel? Any other clues would be appreciated.