From 2dde3e9b8abe789c2223ba9ebd1ec583f0b0a150 Mon Sep 17 00:00:00 2001 From: Carlos Augusto Sanchez Date: Mon, 29 Jul 2013 17:42:27 -0500 Subject: [PATCH] IDEMPIERE-984 Change Role and Logout must check for unsaved records on open windows / implement suggestions from Heng Sin --- .../WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java | 3 --- .../org/adempiere/webui/session/SessionContextListener.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java index bcae1ea138..4252ce3e50 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java @@ -417,9 +417,6 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb //clear context, invalidate session Env.getCtx().clear(); session.invalidate(); - - //redirect to login page - Executions.sendRedirect("index.zul"); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/SessionContextListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/SessionContextListener.java index 07d1b010ad..68c0a7275e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/SessionContextListener.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/SessionContextListener.java @@ -319,7 +319,6 @@ public class SessionContextListener implements ExecutionInit, if (ServerContext.getCurrentInstance().isEmpty() || !isContextValid()) { - SessionManager.logoutSessionAfterBrowserDestroyed(); setupExecutionContextFromSession(Executions.getCurrent()); } int AD_Session_ID = Env.getContextAsInt(Env.getCtx(), "#AD_Session_ID"); @@ -340,6 +339,7 @@ public class SessionContextListener implements ExecutionInit, mSession.setProcessed(true); mSession.saveEx(); } + SessionManager.logoutSessionAfterBrowserDestroyed(); } }