aspose file tools*
The moose likes Spring and the fly likes SpringMVC Custom Collection Editor Not Returning Data To Jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "SpringMVC Custom Collection Editor Not Returning Data To Jsp" Watch "SpringMVC Custom Collection Editor Not Returning Data To Jsp" New topic
Author

SpringMVC Custom Collection Editor Not Returning Data To Jsp

darin ramdhanie
Greenhorn

Joined: Mar 21, 2013
Posts: 6
I am binding a multi select list in spring the item does not get its data from the DAO the data is added from another select option list. The user clicks a button and the data is sent to the multi select option list using jquery.

When the form is posted databinding does not happen for the item since its a complex data type so i registered a CustomEditor and attached it to the @initbinder.

EDITED I have updated the code the CollectionEditor is now returning a list of citizens back to the view however i am unable to get the data in the list to fill the select option. I am trying to add elements to the victimList but the list remains NULL.

Under is the code:

CustomCollectionEditor



Jsp that is filled from DAO in controller

This contains data filled form DAO class when the button is clicked it takes the data from the list on appends it to the other list under which is bind to the POJO



Jsp select item that is bind to POJO



Logs

I am just not sure why the data is not adding to the list its there in the CollectionEditor method;

darin ramdhanie
Greenhorn

Joined: Mar 21, 2013
Posts: 6
Can anyone assist with this??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SpringMVC Custom Collection Editor Not Returning Data To Jsp