diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-09-21 11:06:12 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-09-21 11:06:12 +0000 |
commit | 2a17253cbc11d9ecb097ba3f995fc862e88028e3 (patch) | |
tree | 34d81cf3722ab4d018bb68fb01963fbd9754a974 /src/com | |
parent | 9693ee7b356dcb45859efd789ea62770080a4dfe (diff) | |
download | vaadin-framework-2a17253cbc11d9ecb097ba3f995fc862e88028e3.tar.gz vaadin-framework-2a17253cbc11d9ecb097ba3f995fc862e88028e3.zip |
fixes #3165
svn changeset:15102/svn branch:6.4
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/ui/Table.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 10d334e129..16cf8f3d7e 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -3073,6 +3073,28 @@ public class Table extends AbstractSelect implements Action.Container, Container.PropertySetChangeEvent event) { super.containerPropertySetChange(event); + // sanitetize visibleColumns. note that we are not adding previously + // non-existing properties as columns + Collection<?> containerPropertyIds = getContainerDataSource() + .getContainerPropertyIds(); + for (Iterator<Object> iterator = visibleColumns.iterator(); iterator + .hasNext();) { + Object id = iterator.next(); + if (!(containerPropertyIds.contains(id) || columnGenerators + .containsKey(id))) { + iterator.remove(); + } + } + // same for collapsed columns + for (Iterator<Object> iterator = collapsedColumns.iterator(); iterator + .hasNext();) { + Object id = iterator.next(); + if (!(containerPropertyIds.contains(id) || columnGenerators + .containsKey(id))) { + iterator.remove(); + } + } + resetPageBuffer(); refreshRenderedCells(); } |