From: Matti Tahvonen Date: Thu, 8 May 2008 12:05:32 +0000 (+0000) Subject: fixes #810 X-Git-Tag: 6.7.0.beta1~4800 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ade05263922ca8a46a4cb6263a5f252d8d582fd8;p=vaadin-framework.git fixes #810 svn changeset:4389/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java index 1a1505d8ac..0b8fe1d42d 100644 --- a/src/com/itmill/toolkit/ui/Table.java +++ b/src/com/itmill/toolkit/ui/Table.java @@ -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(); }