user1168608
user1168608

Reputation: 618

How to render pages based on the selection made in the first page of the wizard

I have 4 Wizard pages , say page1 , page2, page3 and page4. Page1 consists of 3 radio buttons. So based on the selection of radio button, one of the 3 pages should be opened.

i.e. if I select the 1st radio button and press Next , then page2 should be opened. similarly 2nd radio button- page3 3rd radio button - page4

How do I achieve this?

Upvotes: 0

Views: 69

Answers (1)

greg-449
greg-449

Reputation: 111142

Override the getNextPage method of your Wizard or WizardPage classes.

For Wizard the method is:

public IWizardPage getNextPage(IWizardPage page)

You are given the current page and return the next page.

For WizardPage the method is:

public IWizardPage getNextPage()

The default behavior of WizardPage.getNextPage is the call the Wizard get next page:

public IWizardPage getNextPage() {
    return wizard.getNextPage(this);
}

There are also similar getPreviousPage methods.

Upvotes: 2

Related Questions