]> source.dussan.org Git - vaadin-framework.git/commitdiff
Update mini tutorial to actually use Root.getCurrent()
authorLeif Åstrand <leif@vaadin.com>
Mon, 2 Jul 2012 08:41:27 +0000 (11:41 +0300)
committerLeif Åstrand <leif@vaadin.com>
Mon, 2 Jul 2012 08:41:27 +0000 (11:41 +0300)
tests/testbench/com/vaadin/tests/minitutorials/v7a1/FindCurrentRootAndApplication.java

index b237666caa1e259e0bb11e949bcb7c738ecdb544..6bd3a166e54c2e7d2da2197b0f03e0c6125d1cc2 100644 (file)
@@ -31,13 +31,17 @@ public class FindCurrentRootAndApplication extends Root {
                 String msg = "Running in ";
                 msg += Application.getCurrent().isProductionMode() ? "production"
                         : "debug";
-                msg += " mode in a Root with the caption "
-                        + Root.getCurrent().getCaption();
-
                 Notification.show(msg);
             }
         });
 
+        helloButton.addListener(new ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                Notification.show("This Root is "
+                        + Root.getCurrent().getClass().getSimpleName());
+            }
+        });
+
         addComponent(helloButton);
     }