From f8e96741faad7b16c1ff9ff145e1872847f93980 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Mon, 8 Feb 2010 04:30:23 +0000 Subject: [PATCH] Model Validator Engine duplicate listeners Thank a lot Low for you review, I can catch the problem now the code validate if the ModelValidator exist into the array for this combination it is not add. kind regards Victor Perez www.e-evolution.com Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2947607 --- .../org/compiere/model/ModelValidationEngine.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/base/src/org/compiere/model/ModelValidationEngine.java b/base/src/org/compiere/model/ModelValidationEngine.java index c42f0ecf1d..248af24f4b 100644 --- a/base/src/org/compiere/model/ModelValidationEngine.java +++ b/base/src/org/compiere/model/ModelValidationEngine.java @@ -433,8 +433,10 @@ public class ModelValidationEngine list.add(listener); m_docValidateListeners.put(propertyName, list); } - //else - // list.add(listener); + else if (!list.contains(listener)) + { + list.add(listener); + } } // addDocValidate /** @@ -850,11 +852,4 @@ public class ModelValidationEngine } } } - - public Hashtable geDocValidateListeners() - { - return m_docValidateListeners; - } - - } // ModelValidatorEngine