details:   https://code.openbravo.com/erp/devel/pi/rev/1e669db00768
changeset: 13137:1e669db00768
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Mon Jul 11 14:36:22 2011 +0200
summary:   Related to issue 17528. Added an error message in the log so that 
developers notice the error in the window definition.

diffstat:

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

diffs (29 lines):

diff -r c31cddfff36b -r 1e669db00768 
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
     Mon Jul 11 13:15:11 2011 +0200
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Mon Jul 11 14:36:22 2011 +0200
@@ -430,6 +430,7 @@
     }
     List<String> changedCols = new ArrayList<String>();
     for (String col : allColumns) {
+      checkNamingCollisionWithAuxiliaryInput(tab, col);
       Field field = columnsOfFields.get(col);
       try {
         String columnId = field.getColumn().getId();
@@ -573,6 +574,17 @@
     }
   }
 
+  private void checkNamingCollisionWithAuxiliaryInput(Tab tab, String col) {
+    List<AuxiliaryInput> auxIns = getAuxiliaryInputList(tab.getId());
+    for (AuxiliaryInput auxIn : auxIns) {
+      if (Sqlc.TransformaNombreColumna(col).equalsIgnoreCase(auxIn.getName())) 
{
+        log.error("Error: a column and an auxiliary input have the same name 
in " + tab
+            + ". This will lead to wrong computation of values for that 
column.");
+      }
+    }
+
+  }
+
   private void subsequentComboReload(Tab tab, Map<String, JSONObject> 
columnValues,
       List<String> changedCols, Map<String, List<String>> columnsInValidation) 
{
 

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to