I have searched extensively all over the internet and this forum for an answer but I don't seem to be able to find an answer to the following question:
Does anyone know of a tutorial for how best to convert a subclass of an AbstractFormController to an analogous annotated Controller?
Before Spring 2.5 was released, I wrote a controller to handle displaying a form, and processing its input. To do this, I extended the AbstractFormController and implemented the showForm, processFormSubmission, and onBind methods. But now that AbstractFormController is deprecated (as of 3.0) I'd like to convert to an annotated controller to do the same thing that AbstractFormController used to do. I'm pretty sure that I have figured out how to do it up to the point of figuring out how to duplicate the functionality of the onBind method. I have annotated the class with the @Controller annotation. I have annotated the showForm method with
And I have annotated the processFormSubmission method with
@RequestMapping(method = RequestMethod.GET)
However, I cannot seem to find an annotation that would tell the onBind method to be called on the bind event.
@RequestMapping(method = RequestMethod.POST)
BTW, the full signature of my original onBind method is
And I know about the @InitBinder annotation but the methods I've seen annotated by it don't appear to have the same signature or function as the onBind method.
protected void onBind(final HttpServletRequest req, final Object cmd, final BindException errors) throws Exception