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 35746720a7..725ba183b4 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 @@ -459,6 +459,8 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb } if (getDesktop() != null && getDesktop().getSession() != null) { getDesktop().getSession().setAttribute(CLIENT_INFO, clientInfo); + } else if (Executions.getCurrent() != null){ + Executions.getCurrent().getSession().setAttribute(CLIENT_INFO, clientInfo); } Env.setContext(Env.getCtx(), "#clientInfo_desktopWidth", clientInfo.desktopWidth); @@ -541,6 +543,11 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb Executions.sendRedirect("index.zul"); } + @Override + public ClientInfo getClientInfo() { + return clientInfo; + } + /** * @return string for setupload */ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ClientInfo.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ClientInfo.java index 0dcd074d24..5cb588d96d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ClientInfo.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ClientInfo.java @@ -103,7 +103,7 @@ public class ClientInfo implements Serializable { * @return the current clientinfo instance */ public static ClientInfo get() { - return SessionManager.getAppDesktop().getClientInfo(); + return SessionManager.getSessionApplication().getClientInfo(); } /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/IWebClient.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/IWebClient.java index f06952a169..59f783b7ef 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/IWebClient.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/IWebClient.java @@ -67,5 +67,8 @@ public interface IWebClient { * @return keylistener */ public abstract Keylistener getKeylistener(); - + + default ClientInfo getClientInfo() { + return getAppDeskop().getClientInfo(); + } } \ No newline at end of file