IDEMPIERE-430 Whole page hang at browser refresh

This commit is contained in:
Heng Sin Low 2012-10-23 16:05:33 +08:00
parent 22769a3584
commit e2618e7232
2 changed files with 6 additions and 1 deletions

View File

@ -259,6 +259,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
if (desktopCache != null)
desktopCache.removeDesktop(Executions.getCurrent().getDesktop());
} catch (Exception e) {
e.printStackTrace();
appDesktop = null;
} finally {
eco.cleanup();

View File

@ -18,6 +18,7 @@
package org.adempiere.webui.component;
import org.adempiere.webui.event.DialogEvents;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Page;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.Events;
@ -74,7 +75,10 @@ public class Window extends org.zkoss.zul.Window
@Override
public void onPageDetached(Page page) {
super.onPageDetached(page);
Events.sendEvent(this, new Event(DialogEvents.ON_WINDOW_CLOSE, this, null));
if (Executions.getCurrent() != null && Executions.getCurrent().getDesktop() != null &&
Executions.getCurrent().getDesktop().getExecution() != null) {
Events.sendEvent(this, new Event(DialogEvents.ON_WINDOW_CLOSE, this, null));
}
}
/**