| Wizard and getNextPage [message #336199] |
Thu, 28 May 2009 13:35  |
Andy Messages: 47 Registered: July 2009 |
Member |
|
|
I am trying to get a Wizard working but dealing with getNextPage is
proving to be a pain. In my Wizard class I have the following:
public IWizardPage getNextPage(IWizardPage page){
System.out.println("This is the current page: " + page.getName());
if(page instanceof FirstPage){
return secondPage;
}
if(page instanceof SecondPage){
return thirdPage;
}
return page;
} // public IWizardPage
In the example above, if I start the wizard everything works fine. The
output is
This is the current page: My First Page
Great.
Here is the problem. If I press next on the wizard, the output of this
then becomes:
This is the current page: My First Page
This is the current page: My Second Page
So my question is why is getNextPage being called twice? If someone
clicks on "Next >" it should only be called once, or at least that is what
would make logical sense to me. Am I doing something wrong? How can I
assure that when someone presses next I only get a single call to
getNextPage? Thanks,
Andy
|
|
|