details:   https://code.openbravo.com/erp/devel/pi/rev/fc4236ca4ff7
changeset: 26100:fc4236ca4ff7
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Mon Mar 02 10:56:15 2015 +0100
summary:   Fixes issue 28754: Context info is properly sent for selectors in 
P&E grids

The problem was that when a selector drop down was open in a P&E window, the 
context info sent to the datasource did not include any info of the record 
being edited. This made impossible to include in the selector a validation 
based on other fields of the P&E window.

To fix this, the OBSelectorItem.prepareDSRequest function has been updated. Now 
that function detects if the selector belongs to a P&E grid, and if so it adds 
to the datasource request params the context info of the record being edited.

diffstat:

 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
 |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 643bf6486d11 -r fc4236ca4ff7 
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
      Fri Feb 27 14:51:17 2015 +0100
+++ 
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Mon Mar 02 10:56:15 2015 +0100
@@ -1127,6 +1127,11 @@
       }
     }
 
+    // if the selector belongs to a P&E grid, include the info of the record 
being edited
+    if (selector.grid && selector.grid.getClassName() === 
'OBPickAndExecuteGrid') {
+      isc.addProperties(params, 
selector.grid.getContextInfo(selector.grid.getEditRow()));
+    }
+
     if (selector.form && selector.form.view && 
selector.form.view.standardWindow) {
       isc.addProperties(params, {
         windowId: selector.form.view.standardWindow.windowId,

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to