From b4ab1d1cb4ac6aa7647b6e39ee991da833f96b8e Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 27 Jun 2008 22:37:52 +0000 Subject: [PATCH] Fix [ 1888786 ] Menu in Spanish not appearing the first time --- .../org/adempiere/webui/AdempiereWebUI.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/extension/posterita/webui/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java b/extension/posterita/webui/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java index 6a699e01b1..05664f566f 100644 --- a/extension/posterita/webui/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java +++ b/extension/posterita/webui/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java @@ -89,13 +89,6 @@ public class AdempiereWebUI extends Window implements EventListener { loginDesktop = null; this.getChildren().clear(); - appDesktop = new Desktop(); - appDesktop.setParent(this); - appDesktop.setClientInfo(clientInfo); - - this.setWidth("100%"); - this.setHeight("100%"); - this.appendChild(appDesktop); Properties ctx = Env.getCtx(); String langLogin = Env.getContext(ctx, Env.LANGUAGE); @@ -103,10 +96,20 @@ public class AdempiereWebUI extends Window implements EventListener langLogin = langSession; Env.setContext(ctx, Env.LANGUAGE, langSession); } - // Validate language Language language = Language.getLanguage(langLogin); Env.verifyLanguage(ctx, language); + Env.setContext(ctx, Env.LANGUAGE, language.getAD_Language()); //Bug + + + appDesktop = new Desktop(); + appDesktop.setParent(this); + appDesktop.setClientInfo(clientInfo); + + this.setWidth("100%"); + this.setHeight("100%"); + this.appendChild(appDesktop); + // Create adempiere Session - user id in ctx Session currSess = Executions.getCurrent().getDesktop().getSession();