Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

darin ramdhanie
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


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


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!