]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #810
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 8 May 2008 12:05:32 +0000 (12:05 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 8 May 2008 12:05:32 +0000 (12:05 +0000)
svn changeset:4389/svn branch:trunk

src/com/itmill/toolkit/ui/Table.java

index 1a1505d8ac3a936755d7e6cf681214174ba5b947..0b8fe1d42d8add64110de7638b53b317048c6376 100644 (file)
@@ -1439,6 +1439,9 @@ public class Table extends AbstractSelect implements Action.Container,
     /**
      * Sets the Container that serves as the data source of the viewer.
      * 
+     * As a side-effect Table's value (selection) is set to null due old
+     * selection not necessary exists in new Container.
+     * 
      * @see com.itmill.toolkit.data.Container.Viewer#setContainerDataSource(Container)
      */
     public void setContainerDataSource(Container newDataSource) {
@@ -1466,6 +1469,10 @@ public class Table extends AbstractSelect implements Action.Container,
         }
         setVisibleColumns(getContainerPropertyIds().toArray());
 
+        // null value as we may not be sure that currently selected identifier
+        // exits in new ds
+        setValue(null);
+
         // Assure visual refresh
         refreshRenderedCells();
     }