details:   /erp/devel/pi/rev/6914fbe010e7
changeset: 11572:6914fbe010e7
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Wed Apr 13 13:03:46 2011 +0200
summary:   Fixes issue 16788: Fixes case when a callout modifies an aux-input

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
 |  15 ++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 4092392748d8 -r 6914fbe010e7 
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
     Wed Apr 13 10:59:01 2011 +0200
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Wed Apr 13 13:03:46 2011 +0200
@@ -1019,6 +1019,21 @@
                       // We need to fire this callout, as the column value was 
changed
                       addCalloutToList(col, calloutsToCall, 
lastfieldChangedList);
                     }
+                  } else {
+                    // A callout could modify the value of an auxiliary input
+                    log.debug("Changing the value of auxiliar input: " + name);
+                    String calloutValue = (String) element.get(1, null);
+                    for (AuxiliaryInput auxInput : 
tab.getADAuxiliaryInputList()) {
+                      final String transformedInputName = "inp" + 
auxInput.getName().toLowerCase();
+                      if (transformedInputName.equals(name)) {
+                        JSONObject newValue = new JSONObject();
+                        newValue.put("classicValue", calloutValue);
+                        newValue.put("value", calloutValue);
+                        columnValues.put("inp" + 
Sqlc.TransformaNombreColumna(auxInput.getName()),
+                            newValue);
+                        break;
+                      }
+                    }
                   }
                 }
               }

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to