This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
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:
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
I am just not sure why the data is not adding to the list its there in the CollectionEditor method;