Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024130Openbravo ERPA. Platformpublic2013-06-18 20:462022-02-01 08:05
dmiguelez 
Triage Platform Base 
normalminoralways
acknowledgedopen 
20Community Appliance
 
 
Core
No
0024130: Default values with OBBindings of OBUISEL_MultiSelectors do not work on first click.
Default values with OBBindings of OBUISEL_MultiSelectors do not work on first click.
Create a new Parameter Window with two references.
One should be a new OBUISEL_Selector based, for example, in AD_Org table.
Another should be a new OBUISEL_MultiSelector based, for example, in C_BPartner table.
The second one should have a default value using obbindings, for example:
"e.id = '" + OB.getParameters().get("AD_Org_ID") + "'"
Open the new Parameter Window and do not select an Organization, when clicking in the multi selector it is empty.
Select an Organization and click again in the multi selector. It is still empty. By second-clicking on it it will retrieve the values for the selected Organization.
It also happens when changing the Organization.
This is a very provisional diff.

diff --git a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js b/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
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
@@ -73,6 +73,10 @@
       this.dataSource.fields = this.selectorGridFields;
       this.dataSource.init();
     }
+
+
+
+
     this.selectorGrid = isc.OBGrid.create({
 
       selector: this.selector,
@@ -94,7 +98,13 @@
       showFilterEditor: true,
       sortField: this.displayField,
 
+
+ fetchData:function(){
+ console.log('fetch')
+ this.Super('fetchData', arguments);
+ },
       onFetchData: function (criteria, requestProperties) {
+ console.log('onFetchData')
         requestProperties = requestProperties || {};
         requestProperties.params = this.getFetchRequestParams(requestProperties.params);
       },
@@ -231,6 +241,13 @@
         this.Super('selectionChanged', arguments);
       }
     });
+
+ this.dataSource.fetchData = function (criteria, callback, requestProperties){
+ console.log('fetch')
+ requestProperties = requestProperties || {};
+ requestProperties.params = selectorWindow.selectorGrid.getFetchRequestParams(requestProperties.params);
+ this.Super('fetchData', arguments);
+ };
 
     this.items = [this.selectorGrid, isc.HLayout.create({
       styleName: this.buttonBarStyleName,
No tags attached.
Issue History
2013-06-18 20:46dmiguelezNew Issue
2013-06-18 20:46dmiguelezAssigned To => AugustoMauch
2013-06-18 20:46dmiguelezModules => Core
2013-06-18 20:46dmiguelezTriggers an Emergency Pack => No
2013-08-01 11:31shankarbAssigned ToAugustoMauch => shankarb
2014-09-03 08:14shankarbAssigned Toshankarb => AugustoMauch
2015-03-17 14:38alostaleAssigned ToAugustoMauch => platform
2015-11-11 11:13alostaleSeveritymajor => minor
2015-11-11 11:13alostaleStatusnew => acknowledged
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.