Solve issue that request props where not send to the server
authorMartin Taal <martin.taal@openbravo.com>
Tue, 08 Mar 2011 15:28:21 +0100
changeset 11101 1724a83b0f0c
parent 11100 3c1ef57fc562
child 11102 9ff12adabca8
Solve issue that request props where not send to the server
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js	Tue Mar 08 15:27:53 2011 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js	Tue Mar 08 15:28:21 2011 +0100
@@ -776,31 +776,33 @@
   
   onFetchData: function(criteria, requestProperties) {    
     requestProperties = requestProperties || {};
+    requestProperties.params = requestProperties.params || {};
+    var params = requestProperties.params;
             
     if (this.targetRecordId) {
-      requestProperties._targetRecordId = this.targetRecordId;
+      params._targetRecordId = this.targetRecordId;
     }
 
     // prevent the count operation
-    requestProperties[isc.OBViewGrid.NO_COUNT_PARAMETER] = 'true';
+    params[isc.OBViewGrid.NO_COUNT_PARAMETER] = 'true';
     
     if (this.orderByClause) {
-      requestProperties[OB.Constants.ORDERBY_PARAMETER] = this.orderByClause;
+      params[OB.Constants.ORDERBY_PARAMETER] = this.orderByClause;
     }
 
     // add all the new session properties context info to the requestProperties
-    isc.addProperties(requestProperties, this.view.getContextInfo(true, false));
+    isc.addProperties(params, this.view.getContextInfo(true, false));
           
     if (this.filterClause) {
       if (this.whereClause) {
-        requestProperties[OB.Constants.WHERE_PARAMETER] = ' ((' + this.whereClause + ') and (' + this.filterClause + ")) ";
+        params[OB.Constants.WHERE_PARAMETER] = ' ((' + this.whereClause + ') and (' + this.filterClause + ")) ";
       } else {
-        requestProperties[OB.Constants.WHERE_PARAMETER] = this.filterClause;
+        params[OB.Constants.WHERE_PARAMETER] = this.filterClause;
       }
     } else if (this.whereClause) {
-      requestProperties[OB.Constants.WHERE_PARAMETER] = this.whereClause;
+      params[OB.Constants.WHERE_PARAMETER] = this.whereClause;
     } else {
-      requestProperties[OB.Constants.WHERE_PARAMETER] = null;
+      params[OB.Constants.WHERE_PARAMETER] = null;
     }
   },