From d948c23bf48ec0cfb4f090f27de468bf59ee71db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Mon, 2 Jul 2012 11:41:27 +0300 Subject: [PATCH] Update mini tutorial to actually use Root.getCurrent() --- .../v7a1/FindCurrentRootAndApplication.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/testbench/com/vaadin/tests/minitutorials/v7a1/FindCurrentRootAndApplication.java b/tests/testbench/com/vaadin/tests/minitutorials/v7a1/FindCurrentRootAndApplication.java index b237666caa..6bd3a166e5 100644 --- a/tests/testbench/com/vaadin/tests/minitutorials/v7a1/FindCurrentRootAndApplication.java +++ b/tests/testbench/com/vaadin/tests/minitutorials/v7a1/FindCurrentRootAndApplication.java @@ -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); } -- 2.39.5