IDEMPIERE-474 Zk: Busy dialog sometime not dismissed after multiple execution of button action
This commit is contained in:
parent
85df60640e
commit
bf630f1907
|
@ -308,6 +308,10 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
||||||
ctx.put(ZK_DESKTOP_SESSION_KEY, this.getPage().getDesktop());
|
ctx.put(ZK_DESKTOP_SESSION_KEY, this.getPage().getDesktop());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ensure server push is on
|
||||||
|
if (!this.getPage().getDesktop().isServerPushEnabled())
|
||||||
|
this.getPage().getDesktop().enableServerPush(true);
|
||||||
|
|
||||||
//update session context
|
//update session context
|
||||||
currSess.setAttribute(SessionContextListener.SESSION_CTX, ServerContext.getCurrentInstance());
|
currSess.setAttribute(SessionContextListener.SESSION_CTX, ServerContext.getCurrentInstance());
|
||||||
|
|
||||||
|
|
|
@ -447,9 +447,22 @@ public class ProcessModalDialog extends Window implements EventListener<Event>,
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void unlockUI(ProcessInfo pi) {
|
public void unlockUI(ProcessInfo pi) {
|
||||||
if (!isLocked || Executions.getCurrent() == null)
|
if (!isLocked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (Executions.getCurrent() == null) {
|
||||||
|
Executions.schedule(getDesktop(), new EventListener<Event>() {
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event event) throws Exception {
|
||||||
|
doUnlockUI();
|
||||||
|
}
|
||||||
|
}, new Event("onUnLockUI"));
|
||||||
|
} else {
|
||||||
|
doUnlockUI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doUnlockUI() {
|
||||||
hideBusyDialog();
|
hideBusyDialog();
|
||||||
isLocked = false;
|
isLocked = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue