File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Select in Spring" Watch "Select in Spring" New topic

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

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:
subject: Select in Spring
It's not a secret anymore!