diff --git a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardCard.java b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardCard.java index 72d19aa..cfd7599 100644 --- a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardCard.java +++ b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardCard.java @@ -8,6 +8,7 @@ import org.gcube.portlets.user.td.wizardwidget.client.dataresource.ResourceBundl import com.allen_sauer.gwt.log.client.Log; import com.google.gwt.user.client.ui.HTML; +import com.google.web.bindery.event.shared.SimpleEventBus; import com.sencha.gxt.widget.core.client.Component; import com.sencha.gxt.widget.core.client.ContentPanel; import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer; @@ -271,5 +272,9 @@ public class WizardCard extends BorderLayoutContainer { { wizardWindow.hide(); } + + public SimpleEventBus getEventBus(){ + return wizardWindow.eventBus; + } } diff --git a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardEntry.java b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardEntry.java index 854c369..f0848df 100644 --- a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardEntry.java +++ b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardEntry.java @@ -11,8 +11,8 @@ public class WizardEntry implements EntryPoint { WizardWindow wizardWindow = new WizardWindow("TestWindow"); - + wizardWindow.add(new SimpleWizardCard("Test Title","Test Footer", "This is a simple card test")); Log.info("Window Id: " + wizardWindow.getId()); - + wizardWindow.show(); } } diff --git a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardWindow.java b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardWindow.java index b62042e..fe442b5 100644 --- a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardWindow.java +++ b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardWindow.java @@ -71,8 +71,13 @@ public class WizardWindow extends Window { * the wizard window title. */ public WizardWindow(String title) { + this(title, new SimpleEventBus()); + + } + + public WizardWindow(String title, SimpleEventBus eventBus) { super(); - this.eventBus = new SimpleEventBus(); + this.eventBus = eventBus; Log.info(title); // setModal(true); setResizable(WIZARRESIZABLE);