Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 20685 - [2004-03-31] Need to be able to tell that user Cancelled out of a wizard
[2004-03-31] Need to be able to tell that user Cancelled out of a wizard
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards
PC All
: P2 (vote)
: 4.x
Assigned To: Jiri Rechtacek
projects, s1s, core-promod
Depends on: 26552
Blocks: 20243
  Show dependency treegraph
Reported: 2002-02-19 18:27 UTC by eakle
Modified: 2008-12-22 22:30 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description eakle 2002-02-19 18:27:40 UTC
WizardDescriptor.Panel.storeSettings() appears to be called when:

	user presses Previous or Next.
	user presses Finish.
	user presses Cancel.

And the instantiate() method on the wizard iterator appears to be called when 
the user presses Finish.

I would like to be able to detect the Cancel case so I can close a connection 
to an external resource (I don't want to close it in the other cases, except 
Finish, where I can do it ok with the current API).  I would like to be able to 
tell via the API (in either the wizard iterator, or in the step) that the user 
Cancelled out of the wizard.
Comment 1 Jesse Glick 2002-03-02 20:50:04 UTC
Can't you check for NotifyDescriptor.CANCEL_OPTION as the wizard value?
Comment 2 eakle 2002-03-05 02:03:45 UTC
in this case, the wizard was called by a mf-layer entry, so I'm not 
sure how I could check the OK/Cancel result.  Also, even if I had 
called this wizard from Java code, the wizard is the place where this 
information is known (what external resources we are connected to), 
so it makes more sense to do cleanup processing from there rather 
from whoever invoked the wizard, so I would prefer it if the wizard 
could tell that the user pressed Cancel.
Comment 3 Marek Grummich 2002-07-22 11:18:53 UTC
Set target milestone to TBD
Comment 4 Marek Grummich 2002-07-22 11:21:46 UTC
Set target milestone to TBD
Comment 5 _ ttran 2002-07-30 15:52:45 UTC
officially requested by S1S, planned for 4.0, upped prio to P1
Comment 6 Jiri Rechtacek 2002-09-06 09:20:28 UTC
seems easy, add getExitStatus() method
Comment 7 Jiri Rechtacek 2002-09-27 18:04:58 UTC
I added getExitStatus to WizardDescriptor, it returns a status of
wizard with has been closed. For example; if wizard was canceled then
returned NotifyDescriptor.CANCEL_OPTION, until not closed than
returned null. The method is designed as public.
Was committed in wizards_redesign_2002Sep branch.
Pete, could you consider if it makes sense for you? Is it useful way
how to solve? Thanks
Comment 8 Jaroslav Tulach 2002-09-30 12:59:12 UTC
These issues have been reported to be part of Sun's "should have" contribution
to NetBeans 4.0 and be "high level" issues. That is why I am changing them to be
FEATUREs with P2. If you think I've done wrong change, please update the issue
and internal documents.
Comment 9 Jesse Glick 2002-11-22 06:03:26 UTC
Please publically justify proposed API changes. I didn't get a real
response to my previous comment.

TW.I.initialize(TW) permits the iterator to get the TW. Then you can
ask for its current value. You can listen to changes in the wizard
too. So what's the problem? Look at the template for Wizard Action in
apisupport (can work with TW.I just as easily I think). Or you could
probably use TW.I.uninitialize to cleanup - I have not tried that but
it may be even simpler.

Propose closing this INVALID and reverting whatever API change was
made on the branch, pending a complete analysis of why a change is
Comment 10 Jiri Rechtacek 2003-08-26 13:55:49 UTC
As Jesse pointed out, you could query WD.getValue() in
WD.P.storeSettings() or TW.I.uninitialize() to decide what to do (e.g.
unlink resources). I close as INVALID. If I'm wrong, describe where is
a problem I'm ready to participate in solving.
Comment 11 Jiri Rechtacek 2004-03-31 09:30:27 UTC
Pete, please could you verify that you are consent with it's closed as
invalid? If yes, we'll quit this. If no, please describe some test
case requires a change. Thanks

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo