Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Wizard and getNextPage
Wizard and getNextPage [message #336199] Thu, 28 May 2009 13:35 Go to previous message
Andy is currently offline 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Unsatisfied version constraint
Next Topic:No more Activator.getDefault().getBundle().getLocation() and Activator.getDefault().getStateLocation
Goto Forum:
  


Current Time: Wed May 22 10:19:38 EDT 2013

Powered by FUDForum. Page generated in 0.01743 seconds