Is there a way to manually invoke spring binding to create an object based on form post data?
Normally I would use something like this:
@RequestMapping({"/url"})
public String execute(MyBindingoObject object, BindingResult errors) {
///...
}
But I am working in a project that uses a generic controller and passes in commands that do the actual work. Is there anyway to do something like this:
MyBindingObject object = SomeSpringUtil.bindObject(MyBindingObject.class, request);
Found the answer:
http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/bind/support/WebRequestDataBinder.html