aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>2007-06-13 14:00:44 +0000
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>2007-06-13 14:00:44 +0000
commitc4bfaa779cee24084cb9b56a3da788e5cab71e85 (patch)
treea7f105a39659081716e7fe3c3a28bd908c917c9d
parentd696fa1abd9a5044b5b7ebdcd62e6880dc65c93a (diff)
downloadvaadin-framework-c4bfaa779cee24084cb9b56a3da788e5cab71e85.tar.gz
vaadin-framework-c4bfaa779cee24084cb9b56a3da788e5cab71e85.zip
Now tree expansion works
svn changeset:1701/svn branch:trunk
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/TkTree.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/TkTree.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/TkTree.java
index 3585bc88ee..55476b94b6 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/TkTree.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/TkTree.java
@@ -42,8 +42,8 @@ public class TkTree extends Composite implements Paintable {
tree.addItem(childUidl.getStringAttribute("caption"));
if(childUidl.getTag().equals("node")) {
TreeNode childTree = new TreeNode();
- childTree.updateFromUIDL(childUidl, client);
tree.addItem(childTree);
+ childTree.updateFromUIDL(childUidl, client);
}
}
String selectMode = uidl.getStringAttribute("selectmode");
@@ -82,10 +82,11 @@ public class TkTree extends Composite implements Paintable {
for (Iterator i = uidl.getChildIterator(); i.hasNext();) {
UIDL childUidl = (UIDL)i.next();
TreeNode childTree = new TreeNode();
- childTree.updateFromUIDL(childUidl, client);
this.addItem(childTree);
+ childTree.updateFromUIDL(childUidl, client);
}
- // TODO if(uidl.getBooleanAttribute("expanded")) setState(true);
+ setState(uidl.getBooleanAttribute("expanded"));
+ setSelected(uidl.getBooleanAttribute("selected"));
}