• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

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

Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


    Bookmark Topic Watch Topic
  • New Topic