[ 2024474 ] UiException: You cannot access components belong to other de

This commit is contained in:
Heng Sin Low 2008-07-26 07:45:49 +00:00
parent a5927fa4f5
commit 1c792b2e0d
1 changed files with 18 additions and 12 deletions

View File

@ -132,30 +132,36 @@ public class AdempiereWebUI extends Window implements EventListener, IWebClient
{
ExecutionCarryOver eco = (ExecutionCarryOver) currSess.getAttribute("execution.carryover");
if (eco != null) {
//try restore
appDesktop = (Desktop) d;
ExecutionCarryOver current = new ExecutionCarryOver(this.getPage().getDesktop());
ExecutionCtrl ctrl = ExecutionsCtrl.getCurrentCtrl();
Visualizer vi = ctrl.getVisualizer();
eco.carryOver();
try {
ctrl = ExecutionsCtrl.getCurrentCtrl();
ctrl.setVisualizer(vi);
appDesktop.getComponent().detach();
} catch (Exception e) {
appDesktop = null;
} finally {
eco.cleanup();
current.carryOver();
}
if (appDesktop != null) {
appDesktop.setPage(this.getPage());
currSess.setAttribute("execution.carryover", current);
}
}
}
if (appDesktop == null)
{
//create new desktop
appDesktop = new Desktop();
appDesktop.setClientInfo(clientInfo);
appDesktop.createPart(this.getPage());