This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

AbstractWizardFormController and abstract HandleRequestInternalPage Title Module

AbstractWizardFormController and abstract HandleRequestInternal

Dec 19th, 2008, 02:05 AM

Hello,
I am attempting to familiarize myself with the AbstractWizardFormController. I have a bean (let's call it SampleBean) with 3 properties (2 strings and 1 int). I have successfully created a SimpleFormController to edit the bean and save changes to it. Now I would like to try making a 3 step process which updates 1 property at a time. I have the following in my dispatcher-servlet.xml:

I have omitted the getters/setters for SomeBean, as well as the FormBackingObject method which returns the SomeBean member for brevity.

The documentation / examples I have discovered make no mention of having to implement handleRequestInternal (which looks like it is inherited all the way from AbstractController), merely processFinish, processCancel, and validatePage. Spring appears to be invoking handleRequestInternal when a request for /wizard.do is received (wizard.do is mapped to this controller), as I receive the UnsupportedOperationException. I was able to gain partial functionality (the ability to move from page 0 to page 1 in the wizard) by implementing this:

Thank you for your response. I am using Spring 2.5.6, and you are absolutely correct that AbstractFormController provides an implementation of handleRequestInternal. Oddly enough, Netbeans does not seem to acknowledge that fact. If I change the body of my WizardCreate handleRequestInternal to "return super.handleRequestInternal(request, response);" it complains that "abstract method handleRequestInternal(javax.servlet.http.HttpServl etRequest, javax.servlet.http.HttpServletResponse) in org.springframework.web.servlet.mvc.AbstractContro ller cannot be accessed directly" and will not compile.

Based on your suggestion, though, I downloaded the latest version of Spring (I was using files from 'spring-framework-2.5-with-docs.zip' and am now using 'spring-framework-2.5.6-with-dependencies.zip') and everything seems to work now.