PDA

View Full Version : Dynamic WizardPage Sequence


afida
Sep 15th, 2004, 02:06 AM
Is it possible to have dynamic WizardPages in a Wizard? I was looking at http://javaprog.net/jwizz/ and it has this concept of Step" similar to "WizardPage". If a step wants to define dynamic steps, it would implement "StepModelCustomizer" interface, and provides Step[] getPendingSteps().

In my case I have have a wizard where few of the WizardPage decide which page comes next depending on some selections made by user. For example if I am importing data into database and depending on the type DataSource, I need decide what follows the current page.

Is it possible to do that with wizard package?

Amad

oliverhutchison
Sep 15th, 2004, 02:14 AM
I don’t use any of the Wizard support but I suspect what you would do is register all possible wizard pages with your Wizard implementation and then use the page level getNextPage() and getPreviousPage() methods to customize the page ordering. It looks to me that any kind of ordering is possible simply by overiding these 2 methods.

Ollie

araghavan
Sep 17th, 2004, 09:22 AM
In addition, I do this by manipulating the _targetX parameter in the jsp to decide which page is the target page.