Friday, 6 September 2013

Umbrella Exception during fire event in GWT

Umbrella Exception during fire event in GWT

I have a Singleton Instance and when I am Firing the event whose handler
uses Singleton instance it resulting in Umbrella Exception. The code
Snippets are
@UiHandler("panelButton")
void handleClick(ClickEvent e) {
AppUtils.eventBus.addHandler(PanelClickEvent.TYPE, new
PanelClickEventHandler());
AppUtils.eventBus.fireEvent(new PanelClickEvent());
}
The Handler is
public class PanelClickEventHandler implements EventHandler{
@Inject
PanelDataHandler pdh;
public void displayPanelGrid() {
System.out.print(pdh.getPanelList().size());
}
}
The error is with the lines
@Inject
PanelDataHandler pdh;
My PanelDataHandler is
@Singleton
public class PanelDataHandler {
.......
@Inject
public PanelDataHandler(){
....
}
.......
}
Is there anything which I am missing? shouln't I use @singleton object in
my handler ?

No comments:

Post a Comment