wood burning stoves*
The moose likes Other Application Frameworks and the fly likes Select in Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
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
 
 
subject: Select in Spring