diff options
author | John Ahlroos <john@vaadin.com> | 2012-09-03 17:30:18 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-09-03 17:30:18 +0300 |
commit | ea82c990660756eef940b98af66d8ff89259a518 (patch) | |
tree | d52110e6be7b07bc33cc79e20130c954030e20d7 /server/src | |
parent | 5f6840fecf1a2b9702bff41b5f8b79c6ad8fffbf (diff) | |
parent | b2d830d1490e762e97f23dca33a21588ab977e65 (diff) | |
download | vaadin-framework-ea82c990660756eef940b98af66d8ff89259a518.tar.gz vaadin-framework-ea82c990660756eef940b98af66d8ff89259a518.zip |
Merge branch 'master' into layoutgraph
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/ui/Tree.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java index 9cf1aa3511..03895a12bb 100644 --- a/server/src/com/vaadin/ui/Tree.java +++ b/server/src/com/vaadin/ui/Tree.java @@ -33,7 +33,7 @@ import java.util.StringTokenizer; import com.vaadin.data.Container; import com.vaadin.data.Item; import com.vaadin.data.util.ContainerHierarchicalWrapper; -import com.vaadin.data.util.IndexedContainer; +import com.vaadin.data.util.HierarchicalContainer; import com.vaadin.event.Action; import com.vaadin.event.Action.Handler; import com.vaadin.event.DataBoundTransferable; @@ -140,6 +140,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * Creates a new empty tree. */ public Tree() { + this(null); } /** @@ -148,7 +149,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * @param caption */ public Tree(String caption) { - setCaption(caption); + this(caption, new HierarchicalContainer()); } /** @@ -158,8 +159,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * @param dataSource */ public Tree(String caption, Container dataSource) { - setCaption(caption); - setContainerDataSource(dataSource); + super(caption, dataSource); } /* Expanding and collapsing */ @@ -827,10 +827,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, @Override public void setContainerDataSource(Container newDataSource) { if (newDataSource == null) { - // Note: using wrapped IndexedContainer to match constructor (super - // creates an IndexedContainer, which is then wrapped). - newDataSource = new ContainerHierarchicalWrapper( - new IndexedContainer()); + newDataSource = new HierarchicalContainer(); } // Assure that the data source is ordered by making unordered |