The moose likes Other Application Frameworks and the fly likes Select in Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "Select in Spring" Watch "Select in Spring" New topic
Author

Select in Spring

Pavan Tummala
Ranch Hand

Joined: Dec 25, 2004
Posts: 74
Whats the best way to deal with html:select in Spring framework, Is spring:bind helpful?


If Java had true garbage collection, most programs would delete themselves upon execution -- Robert Sewell
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
Pavan,

Typically in Spring MVC, you will manually extract the select parameter value by overriding the onBindAndValidate method in your controller. For example:



This ensures that the parameter is set during the binding and validation process and the workflow will result in a call to onSubmit if all is OK or showForm (with appropriate error messages) if not. The jsp code containing the select should be wrapped inside a spring:bind tag.


kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Select in Spring
 
Similar Threads
Spring Framework Reference / Book
Frameworks
WA #1.....word association
Which book to learn Spring?
which technology