Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » WizardDialog's finish button - Don't want to close dialog after finish button is pressed(Don't want to close dialog after finish button is pressed.)
WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #552345] Wed, 11 August 2010 19:41 Go to next message
Page Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
Member
Hi,

In WizardDialog::finishPressed() method, it calls hardClose() method to close the wizard dialog when perform finish is done.

If I have a wizard that doesn't want to close the dialog after finish is pressed, is there a way to configure that? Or do I have to override this finishPressed() method?

Thanks for the help!
Page
Re: WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #553428 is a reply to message #552345] Tue, 17 August 2010 14:00 Go to previous messageGo to next message
Jon Svede is currently offline Jon SvedeFriend
Messages: 83
Registered: July 2009
Member
I don't know the answer to your question, but I am wondering why you don't add a wizard page to your wizard that handles your tasks prior to the actual finish?
Re: WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #553682 is a reply to message #553428] Wed, 18 August 2010 13:42 Go to previous messageGo to next message
Page Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
Member
Thanks for your reply.

Here is our user case. The wizard contains several pages (depending on what kind of object it is creating), the first page lists all the possible types to be created. After all required fields are filled, user can click the finish button to create the selected type.

After creation, user wants the wizard to go back to the first wizard page to create another object.

By default, finish button will dismiss the dialog. So user has to re-launch the wizard again, which is inconvenient.

Page
Re: WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #553751 is a reply to message #553682] Wed, 18 August 2010 17:18 Go to previous messageGo to next message
Jon Svede is currently offline Jon SvedeFriend
Messages: 83
Registered: July 2009
Member
Thanks. I'd think you had have to dig into the platform code - is there any use case in Eclipse itself that does this? You could use plugin spy to deduce the classes and see how it's done.

Some other ideas:

Could you instead use a popup to ask if they want to add another object? Presumably it's a finite number of objects and eventually they'll select 'no'. if they select 'yes' re-launch the wizard?

Another idea would be to simply keep launching the wizard until they click cancel. So in that case they would click 'finish' and the code that called wizard in the first place runs on a loop until they click 'finish' and then click 'cancel' on the resultant wizard.
Re: WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #554491 is a reply to message #553682] Mon, 23 August 2010 11:27 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
On 18/08/10 7:12 PM, Page wrote:
> Here is our user case. The wizard contains several pages (depending on
> what kind of object it is creating), the first page lists all the
> possible types to be created. After all required fields are filled, user
> can click the finish button to create the selected type.
> After creation, user wants the wizard to go back to the first wizard
> page to create another object.

Clicking Finish goes back to the first page? So how does the user gets
out of the wizard?

--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #554840 is a reply to message #553751] Tue, 24 August 2010 14:07 Go to previous messageGo to next message
Page Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
Member
Thanks.

So far I have not found any Eclipse wizards that do that.

I will dig into the code a little more

I will also try your suggestions and see how end user feels.

Page
Re: WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #554841 is a reply to message #554491] Tue, 24 August 2010 14:09 Go to previous messageGo to next message
Page Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
Member
Hi Prakash,

We are thinking to rename the "Cancel" button to "Close" button and user will use this button to exit the wizard.

Page
Re: WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #554977 is a reply to message #554841] Wed, 25 August 2010 03:36 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
On 24/08/10 7:39 PM, Page wrote:
> We are thinking to rename the "Cancel" button to "Close" button and user
> will use this button to exit the wizard.

Its best to give the users the same buttons with the same functionality
to ensure consistency. Instead of changing Finish/Cancel, why can't you
just add a 'Create' button? WizardDialog.createButtonsForButtonBar()
should be helpful to do that

--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: WizardDialog's finish button - Don't want to close dialog after finish button is pressed [message #555107 is a reply to message #554977] Wed, 25 August 2010 13:24 Go to previous message
Page Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
Member
Thanks Prakash, I will explore your suggestion too.

Page
Previous Topic:Re: DataBindig - performance problems when binding large lists
Next Topic:[DataBinding] Observe java.util.Collection
Goto Forum:
  


Current Time: Fri Apr 26 20:59:37 GMT 2024

Powered by FUDForum. Page generated in 0.03625 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top