Fixed 10319: Fix translation of combo fields in search popup
authorStefan Hühner <stefan.huehner@openbravo.com>
Wed, 23 Sep 2009 12:19:29 +0200
changeset 5073 908a09f23ff5
parent 5072 9434157dc8fb
child 5074 bdfd1c945653
Fixed 10319: Fix translation of combo fields in search popup
New search popup code does not use getContext to disable default values.
However #AD_LANGUAGE needs an exception to make translations work
src/org/openbravo/erpCommon/utility/Utility.java
--- a/src/org/openbravo/erpCommon/utility/Utility.java	Wed Sep 23 10:06:09 2009 +0200
+++ b/src/org/openbravo/erpCommon/utility/Utility.java	Wed Sep 23 12:19:29 2009 +0200
@@ -1340,8 +1340,9 @@
         // to be made here, as we disabled getContext (where it was before)
         if (strAux == null || strAux.equals(""))
           strAux = vars.getSessionValue(tab + "|param" + name);
-        // strAux = vars.getSessionValue(window + "|" + name);
-        // strAux = Utility.getContext(conn, vars, name, window);
+        // language needs to be read from preference, to enable translation for ComboTableData
+        if ((strAux == null || strAux.equals("")) && name.equals("#AD_LANGUAGE"))
+          strAux = Utility.getContext(conn, vars, name, window);
       } else {
         strAux = vars.getStringParameter("inp" + Sqlc.TransformaNombreColumna(name));
         if (log4j.isDebugEnabled())