[OBUISEL] Added added organization and other params to request properties
authorIván Perdomo <ivan.perdomo@openbravo.com>
Tue, 08 Mar 2011 13:34:00 +0100
changeset 11091 fe663d27823d
parent 11090 6f23b67db4fa
child 11092 9748e2df70e8
[OBUISEL] Added added organization and other params to request properties
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Tue Mar 08 13:30:50 2011 +0100
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Tue Mar 08 13:34:00 2011 +0100
@@ -85,26 +85,26 @@
       showFilterEditor: true,
       sortField: this.displayField,
       
-      onFetchData: function(criteria, requestProperties) {    
+      onFetchData: function(criteria, requestProperties) {
         requestProperties = requestProperties || {};
-        
+        requestProperties.params = requestProperties.params || {};
+
         // on purpose not sending the third boolean param
-        isc.addProperties(requestProperties, this.selector.form.view.getContextInfo(false, true));
-        
+        isc.addProperties(requestProperties.params, this.selector.form.view.getContextInfo(false, true));
+
         // also adds the special ORG parameter
         if (this.selector.form.getField('organization')) {
-          requestProperties[OB.Constants.ORG_PARAMETER] = this.selector.form.getValue('organization');
+          requestProperties.params[OB.Constants.ORG_PARAMETER] = this.selector.form.getValue('organization');
         } else if (criteria.inpadOrgId) {
-          requestProperties[OB.Constants.ORG_PARAMETER] = criteria.inpadOrgId;
+          requestProperties.params[OB.Constants.ORG_PARAMETER] = criteria.inpadOrgId;
         }
-        requestProperties[OB.Constants.WHERE_PARAMETER] = this.selector.whereClause;
-        
+        requestProperties.params[OB.Constants.WHERE_PARAMETER] = this.selector.whereClause;
+
         // set the default sort option
-        requestProperties[OB.Constants.SORTBY_PARAMETER] = this.displayField;
-        
-        requestProperties._selectorDefinitionId = this.selector.selectorDefinitionId;
-        requestProperties._requestType = 'Window';
-        return requestProperties;
+        requestProperties.params[OB.Constants.SORTBY_PARAMETER] = this.displayField;
+
+        requestProperties.params._selectorDefinitionId = this.selector.selectorDefinitionId;
+        requestProperties.params._requestType = 'Window';
       },
 
       dataArrived: function(){