Related to issue 26198: Added preferenceValues only to the view
authorGuillermo Gil <guillermo.gil@openbravo.com>
Wed, 16 Apr 2014 15:18:59 +0200
changeset 22930 ad890ff93c7e
parent 22929 d67ab4f96f4d
child 22931 2aa45e3949b4
Related to issue 26198: Added preferenceValues only to the view
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/main/ob-standard-view.js	Wed Apr 16 15:11:44 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Apr 16 15:18:59 2014 +0200
@@ -234,9 +234,9 @@
     // logic of the tab, see issue https://issues.openbravo.com/view.php?id=5202), assign them
     // to the form, so they will be retrieved when getContextInfo() is called for the form
     if (this.sessionAttributesNames) {
-      this.viewForm.sessionAttributes = {};
+      this.preferenceValues = {};
       for (i = 0; i < this.sessionAttributesNames.length; i++) {
-        this.viewForm.sessionAttributes[this.sessionAttributesNames[i]] = OB.PropertyStore.get(this.sessionAttributesNames[i], this.standardWindow.windowId);
+        this.preferenceValues[this.sessionAttributesNames[i]] = OB.PropertyStore.get(this.sessionAttributesNames[i], this.standardWindow.windowId);
       }
     }
 
@@ -1441,7 +1441,7 @@
         // Calling getContextInfo with (false, true, true) in order to obtain also the value of the
         // session attributes of the form
         contextInfo = this.getContextInfo(false, true, true);
-        this.addSessionAttributes(contextInfo, tabViewPane);
+        this.addPreferenceValues(contextInfo, tabViewPane);
         if (tabViewPane.showTabIf && !(tabViewPane.showTabIf(contextInfo))) {
           this.childTabSet.tabBar.members[i].hide();
           tabViewPane.hidden = true;
@@ -1486,15 +1486,15 @@
 
   // Adds to contextInfo the session attributes of the childView, 
   // unless the session attribute is an auxiliary input of its parent tab
-  addSessionAttributes: function (contextInfo, childView) {
+  addPreferenceValues: function (contextInfo, childView) {
     var auxInputs = {},
         p;
     if (this.viewForm && this.viewForm.auxInputs) {
       auxInputs = this.viewForm.auxInputs;
     }
-    for (p in childView.viewForm.sessionAttributes) {
-      if (childView.viewForm.sessionAttributes.hasOwnProperty(p) && !auxInputs.hasOwnProperty(p)) {
-        contextInfo[p] = childView.viewForm.sessionAttributes[p];
+    for (p in childView.preferenceValues) {
+      if (childView.preferenceValues.hasOwnProperty(p) && !auxInputs.hasOwnProperty(p)) {
+        contextInfo[p] = childView.preferenceValues[p];
       }
     }
   },