details: /erp/devel/pi/rev/2937875c4b21
changeset: 10312:2937875c4b21
user: Antonio Moreno <antonio.moreno <at> openbravo.com>
date: Wed Feb 02 11:46:44 2011 +0100
summary: Send standard properties to the FIC so that callouts which require
them do not fail
diffstat:
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
| 6 +++---
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 8 ++++++++
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 9 +++++----
3 files changed, 16 insertions(+), 7 deletions(-)
diffs (68 lines):
diff -r 36de0af50bf5 -r 2937875c4b21
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
Tue Feb 01 16:20:44 2011 +0100
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
Wed Feb 02 11:46:44 2011 +0100
@@ -445,11 +445,11 @@
log.error("Couldn't read column value from the request for column "
+ inpColName, e);
}
}
- // We also add special parameters such as the one set by selectors to
the request, so the
- // callouts can use them
- addSpecialParameters(tab, jsContent);
}
+ // We also add special parameters such as the one set by selectors to the
request, so the
+ // callouts can use them
+ addSpecialParameters(tab, jsContent);
}
@SuppressWarnings("unchecked")
diff -r 36de0af50bf5 -r 2937875c4b21
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Tue Feb 01 16:20:44 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Wed Feb 02 11:46:44 2011 +0100
@@ -1382,5 +1382,13 @@
OB.RemoteCallManager.call('org.openbravo.client.application.window.GetTabMessageActionHandler',
{
tabId: this.tabId
}, null, callback, this);
+ },
+
+ addStandardProperties: function(allProperties){
+ for(var objPropertyName in this.standardProperties){
+ if(this.standardProperties.hasOwnProperty(objPropertyName)){
+
allProperties[objPropertyName]=this.standardProperties[objPropertyName];
+ }
+ }
}
});
diff -r 36de0af50bf5 -r 2937875c4b21
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Tue Feb 01 16:20:44 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Wed Feb 02 11:46:44 2011 +0100
@@ -209,7 +209,7 @@
},
retrieveInitialValues: function(isNew){
- var parentId = this.view.getParentId(), requestParams, parentColumn, me =
this, mode;
+ var parentId = this.view.getParentId(), requestParams, parentColumn, me =
this, mode, properties={};
//this.setDisabled(true);
//this.allItemsDisabled = true;
@@ -229,8 +229,9 @@
parentColumn = this.getField(this.view.parentProperty).inpColumnName;
requestParams[parentColumn] = parentId;
}
-
-
OB.RemoteCallManager.call('org.openbravo.client.application.window.FormInitializationComponent',
{}, requestParams, function(response, data, request){
+
+ this.view.addStandardProperties(properties);
+
OB.RemoteCallManager.call('org.openbravo.client.application.window.FormInitializationComponent',
properties, requestParams, function(response, data, request){
me.processFICReturn(response, data, request);
// remember the initial values
me.rememberValues();
@@ -384,7 +385,7 @@
// to recompute combos
doChangeFICCall: function(item){
var parentId = null, me = this, requestParams, allProperties =
this.view.getContextInfo(false, true);
-
+ this.view.addStandardProperties(allProperties);
if (this.view.parentProperty) {
parentId = this.getValue(this.view.parentProperty);
}
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits