wood burning stoves 2.0*
The moose likes Spring and the fly likes initBinder does not work as expected when I use annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "initBinder does not work as expected when I use annotations" Watch "initBinder does not work as expected when I use annotations" New topic
Author

initBinder does not work as expected when I use annotations

Joseph Sweet
Ranch Hand

Joined: Jan 29, 2005
Posts: 327
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!

We must know, we will know. -- David Hilbert
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: initBinder does not work as expected when I use annotations