[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Remove Page in Wizard Framework

> Well, I am dealing with dynamic data that changes and needs to be
> presented to the user.  If I could "add" a page its needed (basically 
add
> the page when the user presses the next button) I could then dynamically
> create the page and its controls.  When the user presses back, I would
> remove that page, so that everytime they press next on this particular
> page they would get a new dynamic page added to the "pages" ArrayList.  
It
> would make the wizard framework more versitile.  
> 
> What are you suggestions for doing page sequencing? 

Adding a page and creating its controls are two different steps.
If you want to delay the creation of a page's controls until the page is 
needed, just override
Wizard.createPageControls to not create that page. The WizardDialog will 
then create the page's 
controls just before it is made visible. Note that this may mean that the 
dialog will have to increase 
its size depending on the size of the page.

You can determine what the next page is by overriding 
WizardPage.getNextPage().
Thus you could show a new page each time next is pressed. 
I assume you truly need to create different controls each time and cannot 
simply reuse a page by updating the values and enablement of existing 
controls.