This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 7706 - [2004-03-31] Need to be able to dynamically enable/disable Finish button
Summary: [2004-03-31] Need to be able to dynamically enable/disable Finish button
Alias: None
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards (show other bugs)
Version: 3.x
Hardware: All All
: P3 normal (vote)
Assignee: Jiri Rechtacek
: 14317 22145 (view as bug list)
Depends on: 26552
Blocks: 15267 21669 22145 37398
  Show dependency tree
Reported: 2000-09-18 21:55 UTC by Unknown
Modified: 2008-12-22 17:39 UTC (History)
6 users (show)

See Also:
Exception Reporter:

patch for review (7.43 KB, patch)
2004-03-22 16:46 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2000-09-18 21:55:31 UTC
I created my own TemplateWizard.Iterator object with a
series of 4 panels. Panels 2 and 3 implement the
WizardDescriptor.FinishPanel interface since it is
usually OK for the user to hit Finish when either
of these are displayed because some of the data
needed to create the new object can be determined
by what info is entered on panels 1 and 2. However,
there is a case where the user may do something on
Panel 3 that would necessitate them entering additional
info on Panel 4. So, at this point, I would like to
enable the Next button but disable the Finish button.
However, theres no way to do it. If 'isValid' returns
false, both Next and Finish are disabled. If it
returns true, they are both enabled. If I don't have
panel 3 implement TemplateWizard.FinishPanel then
the Finish button never enables (which is annoying
since there are times when the user may want to
choose some options on panel 3, but then Finish as
there is nothing they need to do on Panel 4).
Combining Panels 3 and 4 would solve the problem,
but that would cause Panel 3 to have alot of options
for the user on it.

Really what I want is to just have a bit more
control over the enabling/disabling of the buttons.
Comment 1 Jan Zajicek 2001-01-23 09:31:59 UTC
Automated change of version from Other to Dev.
Comment 2 David Strupl 2001-02-21 11:32:41 UTC
You can have JPanel behave like WizardDescriptor.FinishPanel and like
WizardDescriptor.Panel simply by creating two different implementations of
WizardDescriptor.Panel delegating to the same JPanel. I mean the JPanel not
to implement the interfaces but rather create separate objects. And the iterator
can decide whether the next step
will be FinishPanel or not. I am marking the bug as invalid - if you don't agree
please comment and reopen (if you reopen the issue please
use type enhancement instead of deffect).
Comment 3 pete eakle 2002-05-03 16:44:06 UTC
I see in the comment that it is possible to do this.  
However, it should not be that hard to do and it should 
not require research to figure out.  This is something 
that people developing wizards need to do quite often.  
The feature requested here (I am reopening and changing to 
ENHANCEMENT) should be a basic, documented Netbeans wizard 
feature supported in the API -- the ability to enable and 
disable the Next and Finish buttons independently.  See 
also related issues 15267, 11694 and 23116.
Comment 4 _ ttran 2002-07-30 15:46:26 UTC
issue officially requested by S1S, planned for 4.0, prio P1
Comment 5 Jaroslav Tulach 2002-09-30 12:59:34 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 6 Jesse Glick 2002-11-22 05:51:44 UTC
API ease-of-use issue. I am lowering priority because there is a
straightforward workaround as David described. Should be better
documented or a more obvious API provided, e.g.

public interface FinishablePanel extends Panel {
    boolean isFinishPanel();

(marking FinishPanel @deprecated)
Comment 7 Jiri Rechtacek 2003-02-19 12:55:11 UTC
*** Issue 14317 has been marked as a duplicate of this issue. ***
Comment 8 Jiri Rechtacek 2003-08-26 13:30:30 UTC
*** Issue 22145 has been marked as a duplicate of this issue. ***
Comment 9 Jiri Rechtacek 2003-08-26 15:52:54 UTC
*** Issue 15267 has been marked as a duplicate of this issue. ***
Comment 10 Jiri Rechtacek 2004-01-06 09:10:15 UTC
No changes planned to 3.6.
Comment 11 Jiri Rechtacek 2004-03-20 12:05:27 UTC
draft implementation was commited in wizards_36584 branch (use cvs
update -f -r wizarrd_36584 openide/src core/windows/src)
Comment 12 Jiri Rechtacek 2004-03-22 16:46:25 UTC
Created attachment 14083 [details]
patch for review
Comment 13 Jiri Rechtacek 2004-03-22 16:47:57 UTC
Dear reviewers, please could you review the attached patch before
merge to maintrunk? Thanks
Comment 14 Jiri Rechtacek 2004-03-29 13:27:34 UTC
Thanks for review, the proposed change intergrated in maintrunk.
Comment 15 Marian Mirilovic 2005-12-20 15:48:57 UTC
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now. 
If you are still able to reproduce the problem, please reopen. Thanks in advance.