• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

initBinder does not work as expected when I use annotations

Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to bind a multiple <select> in a JSP page to a Set collection in the command object.

The code works when I use the older version of Spring (i.e. without annotations), but some things do not work when I am using the newer version of Spring (i.e. with annotations).

The older code that does work:

Using it in the JSP page:

The JSP above works fine, because the the options of the <SELECT> show both the value and the label.

However the following newer initBinder does not fully work, because for the same JSP, the value of each option in the <SELECT> is empty (the HTML shows value=""). It does show the label.

Here is the code for Category:

Please help me understand why the initBinder does not fully work when I am using annotations.

Thank you for your time!
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic