]> source.dussan.org Git - vaadin-framework.git/commitdiff
Count instances instead of windows and also show the counter
authorLeif Åstrand <leif@vaadin.com>
Mon, 18 Feb 2013 10:57:29 +0000 (12:57 +0200)
committerLeif Åstrand <leif@vaadin.com>
Mon, 18 Feb 2013 11:11:43 +0000 (13:11 +0200)
Change-Id: Ida1d0c9424d09169f3c7f76ebf70dcced5742dad

uitest/src/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java

index ecca98b884bf3ddb0c931b29b330e56bb00834e0..48ccd217ca237327737846c3f7de5775d70ed73c 100644 (file)
@@ -18,6 +18,7 @@ package com.vaadin.tests.minitutorials.v7a1;
 
 import com.vaadin.annotations.PreserveOnRefresh;
 import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.CssLayout;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.UI;
 
@@ -31,13 +32,12 @@ import com.vaadin.ui.UI;
  */
 @PreserveOnRefresh
 public class CreatingPreserveState extends UI {
-    private static int windowCounter = 0;
+    private static int instanceCounter = 0;
 
     @Override
     public void init(VaadinRequest request) {
-        TextField tf = new TextField("Window #" + (++windowCounter));
+        TextField tf = new TextField("Instance #" + (++instanceCounter));
         tf.setImmediate(true);
-        setContent(tf);
+        setContent(new CssLayout(tf));
     }
-
 }