Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » [SOLVED] HOWTO Pass data(parameters) between wizard pages
[SOLVED] HOWTO Pass data(parameters) between wizard pages [message #754284] Tue, 01 November 2011 19:23 Go to next message
Nicolas  is currently offline Nicolas Friend
Messages: 23
Registered: October 2011
Junior Member
Hi, I have this situation:
One wizard with two pages.
on firts page I let the user to select intems from a grid (Table Viewer), and have 2 combos that acts as filters.

on page 2 I let the user to use a file dialog to choose a file, where to export items selected in firt page.

I wnat to display to the user in the 2nd page the filters selected in the 1st page.

As I can see the two pages area instantited at wizard creation time

	@Override
	public void addPages() {
		
		page1 = new ExportarEnsayosPage1(page2);
		page2 = new ExportarEnsayosPage2(page1);
		
		page1.setPageComplete(false);
		page2.setPageComplete(false);
		
		addPage(page1);
		addPage(page2);
	}


The problem is that I want to update Labels in the 2nd page, whenever the user camnge the selection in the combo.

I don't know how to access and fire setText() method on the Labels no the page 2 from the page 1 of the wizard.

I try several ways.
-passing the 2nd page as parameter to the 1st page.
-using getPage("paso2") method of the wizard ...

nothing works...

Any Idea ?
what i'm doing wrong !

I'm in eclipse 3.7, with java 1.5 !

Best Regards

[Updated on: Tue, 01 November 2011 19:33]

Report message to a moderator

Re: [SOLVED] HOWTO Pass data(parameters) between wizard pages [message #754287 is a reply to message #754284] Tue, 01 November 2011 19:36 Go to previous message
Nicolas  is currently offline Nicolas Friend
Messages: 23
Registered: October 2011
Junior Member
What I did is:

make sure that page2 is instantiated befor creatin page1:
		page2 = new ExportarEnsayosPage2();
		page1 = new ExportarEnsayosPage1(page2);



en events in page 1, I call events on page 2, in this case page 2 is not null !!
	private void actualizarPage2() {
		//IWizard wizard = this.getWizard();
		//ExportarEnsayosPage2 page2 = (ExportarEnsayosPage2) wizard.getPage("ExportarEnsayoPage2");
		if (page2 != null) {
			page2.actualizarLabelAnio(_Anio);
			page2.setLabelLocalidad(_localidad.getDescripcion());
		}
	}



and finally:
in page 2 those method force the redraw and pack !
	public void actualizarLabelAnio (String anio){
		lblTxtanio.setText(anio);
		lblTxtanio.redraw();
		lblTxtanio.pack(true);
		
		getWizard().getContainer().updateButtons();
	}

	public void setLabelLocalidad (String localidad){
		lblTxtlocalidad.setText(localidad);
		lblTxtlocalidad.redraw();
		lblTxtlocalidad.pack(true);
		
		getWizard().getContainer().updateButtons();
	}


I don't know if they are redundant .... but i lost a hughe amount of time... so this is way it works !!
Previous Topic:Web Start Xerces Issue
Next Topic:Add Server Admin panel in own RCP Application (Extremely sorry for Last incomplete Post )
Goto Forum:
  


Current Time: Fri Apr 26 19:07:05 GMT 2024

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

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

Back to the top