This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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
jQuery in Action, 3rd edition