Browse Source

fixes #3165


svn changeset:15102/svn branch:6.4
tags/6.7.0.beta1
Matti Tahvonen 13 years ago
parent
commit
2a17253cbc
1 changed files with 22 additions and 0 deletions
  1. 22
    0
      src/com/vaadin/ui/Table.java

+ 22
- 0
src/com/vaadin/ui/Table.java View File

@@ -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();
}

Loading…
Cancel
Save