Hi,
i m using Bushe´s Eventbus in a vaadin appliction (the ThreadSaveEventService). However, there seems to be a syncronization problem:
(1) I send the “Open Window” Event on a Button-Click Listner
(2) I receive the event (println() displays the message)
(3) But the window does not open …
I use the following code …
public Window openWindow(MoListView view){
Window win = new MoListViewEditor(view);
win.setWidth("90%");
win.setHeight("90%");
win.center();
win.setModal(true);
getMainWindow().addWindow(win);
System.out.println("FlatplierApplication / openWindow: window added " + view.getListViewTitle());
getMainWindow().showNotification("FlatplierApplication / openWindow called");
return win;
}
public void onEvent(SelectEntityEvent ev) {
System.out.println("FlatplierApplication / onEvent " + ev.getMsg());
if (ev.getMsg().equals("open")) {
openWindows.put(ev.getView(), openWindow(ev.getView()));
}
How should i syncronized the ui-thread? Or should i simply call repaint? If i call getMainWindow().notify() after the addWindow() call, i get a long stack trace ( java.lang.IllegalMonitorStateException) …
Any help appreciated … thanks a lot,
Dan