]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #810, #4607,#5279, #5281
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 30 Jun 2010 20:31:08 +0000 (20:31 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 30 Jun 2010 20:31:08 +0000 (20:31 +0000)
all selects now reset value on container changes. The approach has been used in table previously

reverted an invalid fix from VFilterSelect

svn changeset:13980/svn branch:6.4

src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
src/com/vaadin/ui/AbstractSelect.java
src/com/vaadin/ui/Table.java

index ed9acb66842a2445cfb3fa5e44751f054b8405b8..f51a2e512040037123b6eb9dddc72eec6f2f911c 100644 (file)
@@ -962,7 +962,6 @@ public class VFilterSelect extends Composite implements Paintable, Field,
         lastNewItemString = null;
 
         currentSuggestions.clear();
-        currentSuggestion = null;
         final UIDL options = uidl.getChildUIDL(0);
         totalMatches = uidl.getIntAttribute("totalMatches");
 
index 60dfea0da264725c66440bfc0770140e166b2e7a..30842dae2db5906d2e6badd7a4db4365f1237fc3 100644 (file)
@@ -901,7 +901,14 @@ public abstract class AbstractSelect extends AbstractField implements
                 }
             }
 
+            /*
+             * We expect changing the data source should also clean value. See
+             * #810, #4607, #5281
+             */
+            setValue(null);
+
             requestRepaint();
+
         }
     }
 
index 031935cc70fe23a3346dfaced8cab22bdccd7940..e45570e2395df8503e0fbfe11fa12ebac2500036 100644 (file)
@@ -1846,10 +1846,6 @@ public class Table extends AbstractSelect implements Action.Container,
 
         setVisibleColumns(col.toArray());
 
-        // null value as we may not be sure that currently selected identifier
-        // exits in new ds
-        setValue(null);
-
         // Assure visual refresh
         resetPageBuffer();