]> source.dussan.org Git - vaadin-framework.git/commitdiff
demo fix, bug #1191 filed.
authorJani Laakso <jani.laakso@itmill.com>
Mon, 26 Nov 2007 10:34:50 +0000 (10:34 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Mon, 26 Nov 2007 10:34:50 +0000 (10:34 +0000)
svn changeset:2957/svn branch:trunk

src/com/itmill/toolkit/tests/TestBench.java

index 5e6d875353159633ddd883730cc8e8272b14a90f..76f1c119c57af3758255f619b675e59d0ffcd1cd 100644 (file)
@@ -88,15 +88,18 @@ public class TestBench extends com.itmill.toolkit.Application implements
         }
 
         menu = new Tree("Testables", testables);
-        // simplify captions
+
         for (Iterator i = itemCaptions.keySet().iterator(); i.hasNext();) {
             Class testable = (Class) i.next();
-            menu.setItemCaption(testable, testable.getName());
-        }
-        // collapse all items within menu
-        for (Iterator i = menu.rootItemIds().iterator(); i.hasNext();) {
-            menu.collapseItemsRecursively(i.next());
+            // simplify captions
+            String name = testable.getName().replaceAll("com.itmill.toolkit.",
+                    "");
+            menu.setItemCaption(testable, name);
+            // TODO fix #1191
+            System.err.println(name);
+            menu.collapseItem(testable);
         }
+
         menu.addListener(this);
         menu.setImmediate(true);