Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » how to populate WizardPage at view time?
how to populate WizardPage at view time? [message #81613] Sat, 05 April 2008 14:31 Go to next message
Eclipse UserFriend
Hi all,
Using latest RAP. I want my subclass of WizardPage to populate at view
time, on the basis of information entered in the previous page. How can I
do this? I cannot find a single method in WizardPage which is called at
the time when it becomes the current page in the wizard.

I also find that getControl() gets called multiple times before the page
is the current page. Within method getControl(), I find that
isCurrentPage() always return false, so I cannot use this to hook into
whent he WizardPage intially loads.
Thanks much,
David Donohue

@Override
public Control getControl() {
log.info("getControl() called; isCurrentPage()? "+ isCurrentPage());
return super.getControl();
}
Re: how to populate WizardPage at view time? [message #81643 is a reply to message #81613] Sun, 06 April 2008 11:04 Go to previous messageGo to next message
Eclipse UserFriend
Well for others w/ this problem:
This solution applies for wizards in RAP version of JFace wizards, but
likely applies to RCP version as well.

As far as I could find, it turns out that the wizard infrastructure does
not notify either the IWizard nor the IWizardPage when the next button is
pressed. So I had to subclass the WizardDialog like this

public class DynaWizardDialog extends WizardDialog {

public DynaWizardDialog(Shell parentShell, IWizard newWizard) {
super(parentShell, newWizard);
// TODO Auto-generated constructor stub
}

@Override
public void nextPressed() {
IWizardPage nextPage = getCurrentPage().getNextPage();
if (nextPage instanceof DynaWizardPage) {
((DynaWizardPage)nextPage).onEnterPage();
}
super.nextPressed();
}
}

and added a method to my own subclass of WizardPage, to receive the
onEnterPage call:

public class DynaWizardPage extends WizardPage {

public void onEnterPage() {
...
}
}
Re: how to populate WizardPage at view time? [message #83263 is a reply to message #81643] Wed, 16 April 2008 11:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

David,

as you are using a WizardDialog, have you tried to use
WizardDialog#addPageChangingListener ?

Cheers,
Rüdiger

David Donohue wrote:
> Well for others w/ this problem:
> This solution applies for wizards in RAP version of JFace wizards, but
> likely applies to RCP version as well.
>
> As far as I could find, it turns out that the wizard infrastructure does
> not notify either the IWizard nor the IWizardPage when the next button
> is pressed. So I had to subclass the WizardDialog like this
>
> public class DynaWizardDialog extends WizardDialog {
>
> public DynaWizardDialog(Shell parentShell, IWizard newWizard) {
> super(parentShell, newWizard);
> // TODO Auto-generated constructor stub
> }
>
> @Override
> public void nextPressed() {
> IWizardPage nextPage = getCurrentPage().getNextPage();
> if (nextPage instanceof DynaWizardPage) {
> ((DynaWizardPage)nextPage).onEnterPage();
> }
> super.nextPressed();
> }
> }
>
> and added a method to my own subclass of WizardPage, to receive the
> onEnterPage call:
>
> public class DynaWizardPage extends WizardPage {
>
> public void onEnterPage() {
> ...
> }
> }
>
Re: how to populate WizardPage at view time? [message #83511 is a reply to message #83263] Fri, 18 April 2008 01:06 Go to previous messageGo to next message
Eclipse UserFriend
Rüdiger,

> as you are using a WizardDialog, have you tried to use
> WizardDialog#addPageChangingListener ?

You statement above implies that we can put wizard in container other than
Dialog, is it possible to put it in IEditorPart or IViewPart for instance ?

Regards,

Setya
Re: how to populate WizardPage at view time? [message #83802 is a reply to message #83511] Mon, 21 April 2008 05:52 Go to previous message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Hi Setya,

with a custom implementation of IWizardContainer it is possible to
place a wizard in a container other than a dialog.
Though technically possible, I am not sure if this is something a
user would expect.

Cheers,
Rüdiger


Setya wrote:
> Rüdiger,
>
>> as you are using a WizardDialog, have you tried to use
>> WizardDialog#addPageChangingListener ?
>
> You statement above implies that we can put wizard in container other
> than Dialog, is it possible to put it in IEditorPart or IViewPart for
> instance ?
>
> Regards,
>
> Setya
>
Previous Topic:Integration Spring (session/request) scoped Beans into RAP
Next Topic:multithreading
Goto Forum:
  


Current Time: Sun Aug 31 00:08:00 EDT 2025

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

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

Back to the top