Fixes issue 26008: Problem while picking a business partner using a selector
authorAugusto Mauch <augusto.mauch@openbravo.com>
Fri, 14 Mar 2014 17:25:28 +0100
changeset 22710 d8f328c5d332
parent 22709 31ec6d0191e3
child 22711 d7843bd87a36
Fixes issue 26008: Problem while picking a business partner using a selector

The problem was that the overwrittenAuxiliaryInputs parameter (a string array) was being returned in the getContextInfo function, and sent to all action handlers. Some action handlers assume that the parameters do not contain arrays, and where having problems trying to convert the string array to a plain string.

The overwrittenAuxiliaryInputs parameter is only used in the FIC, and only when it is called in CHANGE mode. For all other modes, the paramater is reset to an empty string array in the FIC. To fix this, the overwrittenAuxiliaryInputs parameter is only sent to the FIC, and only in CHANGE mode.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Fri Mar 14 15:53:10 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Fri Mar 14 17:25:28 2014 +0100
@@ -1343,6 +1343,9 @@
       requestParams.CHANGED_COLUMN = item.inpColumnName;
     }
     allProperties._entityName = this.view.entity;
+    if (this.overwrittenAuxiliaryInputs) {
+      allProperties.overwrittenAuxiliaryInputs = this.overwrittenAuxiliaryInputs;
+    }
 
     // disable with a delay to allow the focus to be moved to a new field
     // before disabling
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Fri Mar 14 15:53:10 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Fri Mar 14 17:25:28 2014 +0100
@@ -2275,9 +2275,6 @@
       isc.addProperties(contextInfo, form.auxInputs);
       isc.addProperties(contextInfo, form.hiddenInputs);
       isc.addProperties(contextInfo, form.sessionAttributes);
-      if (form.overwrittenAuxiliaryInputs) {
-        contextInfo.overwrittenAuxiliaryInputs = form.overwrittenAuxiliaryInputs;
-      }
     }
 
     if (this.parentView) {