fixed issue 40562: HelpWindow.generateWindow is not using bind-variables
authorAsier Lostalé <asier.lostale@openbravo.com>
Thu, 11 Apr 2019 08:32:00 +0200
changeset 35644 650a871f6cd2
parent 35643 4e9a59919638
child 35645 eed3ff80f388
fixed issue 40562: HelpWindow.generateWindow is not using bind-variables
src/org/openbravo/erpCommon/ad_help/HelpWindow.java
--- a/src/org/openbravo/erpCommon/ad_help/HelpWindow.java	Thu Apr 11 08:28:42 2019 +0200
+++ b/src/org/openbravo/erpCommon/ad_help/HelpWindow.java	Thu Apr 11 08:32:00 2019 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2018 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -192,7 +192,8 @@
 
       // Grid Configuration at Tab Level
       OBQuery<GCTab> tabGridConfigQuery = OBDal.getInstance()
-          .createQuery(GCTab.class, "tab.window.id = '" + localStrKeyId + "'");
+          .createQuery(GCTab.class, "tab.window.id = :windowId");
+      tabGridConfigQuery.setNamedParameter("windowId", localStrKeyId);
       List<GCTab> tabGridConfigList = tabGridConfigQuery.list();
       for (GCTab gcTab : tabGridConfigList) {
         String tabId = gcTab.getTab().getId();