]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #1699 (i hope)
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 21 May 2008 12:20:56 +0000 (12:20 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 21 May 2008 12:20:56 +0000 (12:20 +0000)
svn changeset:4595/svn branch:trunk

src/com/itmill/toolkit/ui/AbstractField.java
src/com/itmill/toolkit/ui/Select.java

index fb251d70b692e3d2d04529dd8af3be4ad158dd58..c2e7cef57b4e465a3d184cadd3d6ebe36c49b516 100644 (file)
@@ -56,7 +56,7 @@ public abstract class AbstractField extends AbstractComponent implements Field,
     private boolean delayedFocus;
 
     /**
-     * Value of the datafield.
+     * Value of the abstract field.
      */
     private Object value;
 
@@ -863,9 +863,7 @@ public abstract class AbstractField extends AbstractComponent implements Field,
 
     public void changeVariables(Object source, Map variables) {
         super.changeVariables(source, variables);
-        if (validators != null && !validators.isEmpty()) {
-            requestRepaint();
-        }
+
     }
 
     /**
@@ -938,14 +936,18 @@ public abstract class AbstractField extends AbstractComponent implements Field,
 
     /**
      * Sets the internal field value. This is purely used by AbstractField to
-     * change the internal Field value. It does not trigger any events. It can
-     * be overriden by the inheriting classes to update all dependent variables.
+     * change the internal Field value. It does not trigger valuechange events.
+     * It can be overriden by the inheriting classes to update all dependent
+     * variables.
      * 
      * @param newValue
      *                the new value to be set.
      */
     protected void setInternalValue(Object newValue) {
         value = newValue;
+        if (validators != null && !validators.isEmpty()) {
+            requestRepaint();
+        }
     }
 
     /**
index eaeffdc7460aadb1aa4920a4fac77deeed0bdd88..5b33aadd5ca90812757b47c50665a04eeca2b7f7 100644 (file)
@@ -322,11 +322,6 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering {
      */
     public void changeVariables(Object source, Map variables) {
 
-       // TODO We really should call super instead, but this needs validating that AbstractSelect.changeVariables is correct. See ticket #
-               if (isReadThrough() || !isModified() || (getValidators() != null && !getValidators().isEmpty())) {
-                       fireValueChange(false);
-               }
-
         // Selection change
         if (variables.containsKey("selected")) {
             final String[] ka = (String[]) variables.get("selected");