diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2008-03-05 12:57:39 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2008-03-05 12:57:39 +0000 |
commit | 98811b95f452d3aba3998f31a314dc5cdce7bdb7 (patch) | |
tree | b38e26aa3195cefdb5aef6da3974bda9595f077e /src/com/itmill/toolkit/ui/Table.java | |
parent | 26c259d98876425d2955cf191e869a8ff316954c (diff) | |
download | vaadin-framework-98811b95f452d3aba3998f31a314dc5cdce7bdb7.tar.gz vaadin-framework-98811b95f452d3aba3998f31a314dc5cdce7bdb7.zip |
fixes #1368
svn changeset:3973/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/Table.java')
-rw-r--r-- | src/com/itmill/toolkit/ui/Table.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java index dc73c913d7..0ef9951f18 100644 --- a/src/com/itmill/toolkit/ui/Table.java +++ b/src/com/itmill/toolkit/ui/Table.java @@ -2163,11 +2163,18 @@ public class Table extends AbstractSelect implements Action.Container, */ public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { - if (!super.addContainerProperty(propertyId, type, defaultValue)) { - return false; - } + + boolean visibleColAdded = false; if (!visibleColumns.contains(propertyId)) { visibleColumns.add(propertyId); + visibleColAdded = true; + } + + if (!super.addContainerProperty(propertyId, type, defaultValue)) { + if(visibleColAdded) { + visibleColumns.remove(propertyId); + } + return false; } return true; } |