Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Need help with JFace Wizard
Need help with JFace Wizard [message #467330] Sun, 29 January 2006 02:46 Go to next message
paul is currently offline paulFriend
Messages: 8
Registered: July 2009
Junior Member
Hi,
I am writing a JFace wizard consisting of 2 pages.
There is also a datamodel class.

The first wizard page takes user's input, and then update the datamodel
object. (No problem here.)
When I click the Next Button, the 2nd page is supposed to display the
updated content of the datamodel object.

The question is how to make the 2nd page access the new data? (It seems
the createControl() method of the 2nd page was executed when the wizard is
first loaded, therefore, can not access/display the new data dynamically.)

Can anyone help me out? Thank you very much in advance.

Paul
Re: Need help with JFace Wizard [message #467343 is a reply to message #467330] Sun, 29 January 2006 17:35 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Paul,
it is your model - you can update widgets in 2nd page when
you change datamodel (or first page)

paul wrote:

> Hi,
> I am writing a JFace wizard consisting of 2 pages.
> There is also a datamodel class.
>
> The first wizard page takes user's input, and then update the datamodel
> object. (No problem here.)
> When I click the Next Button, the 2nd page is supposed to display the
> updated content of the datamodel object.
>
> The question is how to make the 2nd page access the new data? (It seems
> the createControl() method of the 2nd page was executed when the wizard is
> first loaded, therefore, can not access/display the new data dynamically.)
>
> Can anyone help me out? Thank you very much in advance.
>
> Paul
Re: Need help with JFace Wizard [message #467344 is a reply to message #467330] Sun, 29 January 2006 17:26 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
Like Haris implied, if your datamodel fires JavaBean-like events when data is changed, then your wizard pages will always show the right answer. For example, when creating a new plugin, the plugin name is used to drive a lot of the package names and IDs; each letter typed causes a chain-reaction of events that update the other fields. It's the same principle for a multi-page wizard, except that you won't see the updates happening :-)

Otherwise, you can override the setVisible() method, which (if I remember correctly) is fired when a page on a multi-page wizard is shown. Alternatviely, you can override the showPage in your own subclass of WizardDialog if you need to hook in some action when a page is changed.

Alex.
Previous Topic:FormToolkit working in a standalone SWT/Jface app?
Next Topic:Redrawing
Goto Forum:
  


Current Time: Wed Sep 18 15:25:10 GMT 2019

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

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

Back to the top