File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes SpringMVC how to Bind Multi Select Options When Form Is Returned From Controller Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "SpringMVC how to Bind Multi Select Options When Form Is Returned From Controller" Watch "SpringMVC how to Bind Multi Select Options When Form Is Returned From Controller" New topic
Author

SpringMVC how to Bind Multi Select Options When Form Is Returned From Controller

darin ramdhanie
Greenhorn

Joined: Mar 21, 2013
Posts: 6
I have four select option list two are populated with data form the database and two are multi selects which are bind to the POJO. I then use java script to add options form the database select option list into the bind select option list however when i submit to the controller if the form is returned with errors and the select option list have data in it the data is lost.

The list items are both getting data properly only when the form is posted to the controller if the validation finds any errors and returns the form if these fields had data its lost.
I saw based on some research i need to register a custom binder but i am not sure how to write a binder for just the two fields (criminals and victims) and how do i populate the list to be returned

jsp:





Jquery
This is used to add items from the dblist to the from bind list elements




Validation

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SpringMVC how to Bind Multi Select Options When Form Is Returned From Controller