Bug 92422 - [Wizards] WizardDialog sets WizardPage visibility in unnatural order
Summary: [Wizards] WizardDialog sets WizardPage visibility in unnatural order
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows XP
: P4 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-22 14:07 EDT by Chris Merrill CLA
Modified: 2019-09-06 16:06 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Merrill CLA 2005-04-22 14:07:55 EDT
When a page change happens in a wizard, the current page becomes invisible AFTER
the next page becomes visible.  Since there is no API for catching page-change
events, overriding setVisible() seems to be the only way to code actions on
page-changes, which is critical for any complex wizard.  If the setVisible()
methods were called in the natural order (current becomes not visible THEN next
page becomes visible), this would be a usable workaround.

The change is simple.  In updateForPage(IWizardPage page) of WizardDialog:

change this:
    currentPage = page;
    currentPage.setVisible(true);
    if(oldPage != null)
        oldPage.setVisible(false);
to this:
    if(oldPage != null)
        oldPage.setVisible(false);
    currentPage = page;
    currentPage.setVisible(true);

Since the method is private, we can't even override the method to make the
change.  I've make my own version of WizardDialog and this change seems to work
fine, although I admit I have not done any extensive testing.

Thanks,
Chris


p.s. I apologize if this is the wrong component...there is no JFace component.
Comment 1 Jim Adams CLA 2005-04-27 11:10:35 EDT
Wouldn't a better implementation be to add an event that has both pages in the 
event. This would also give you a way, in the wizard, to cancel the event to 
disallow it from happening if there is some problem with the code that has to 
know about both pages.
Comment 2 Chris Merrill CLA 2005-04-27 11:25:29 EDT
Well, duh.  Of course that would be better!  I've been wondering why that wasn't
there in the first place.

The proposed change (bugfix?) shouldn't require a committee to make a decision
so I hope it has a good chance of inclusion in a release promptly.
Comment 3 Karice McIntyre CLA 2006-09-05 16:13:57 EDT
The suggested fix in the original bug report will cause undesirable behavior - see bug 154794#c4 for full explanation.  In short, what can happen is you will see a blank page when the back/next buttons are pressed when a wizard page calls IWizardContainer#run in their own implementation of WizardPage#setVisible.
Comment 4 Boris Bokowski CLA 2009-11-26 16:20:00 EST
Prakash is now responsible for watching bugs in the [Wizards] component area.
Comment 5 Eclipse Webmaster CLA 2019-09-06 16:06:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.