views:

32

answers:

1

I am using a controller implementation that is extending the Spring MVC

AbstractWizardFormController

This wizard controller will consist of 4 pages. The first 2 pages are used to collect information. The third page will show results based on what information is submitted on page 1 and 2.

So to be a little more specific

Page 1 the user will select a state and some other information

Page 2 the user will enter more information such as contact information

Page 3 will display information dependent on the information collected in first two pages

There is more pages after this, but they do not pertain, so if the first think you are thinking of is using onSubmit(), then it wont work because it is not the end of the controller life.

I need to collect all the data from the first two pages, and then run a db query and return it to the third page. where and how is the best way to do this, do I run the query in reference data when returning to the third page?

+2  A: 

You can use postProcessPage method. Its API is clear

Post-process the given page after binding and validation, potentially updating its command object. The passed-in request might contain special parameters sent by the page.

Arthur Ronald F D Garcia