From e55ee60d44d4397ff605aef2b37dbec7aa99f742 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 11 Apr 2012 20:54:58 +0300 Subject: [PATCH] Workaround for problem with wrong state being created --- src/com/vaadin/ui/Root.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/vaadin/ui/Root.java b/src/com/vaadin/ui/Root.java index febfc8c4dd..541127e092 100644 --- a/src/com/vaadin/ui/Root.java +++ b/src/com/vaadin/ui/Root.java @@ -30,6 +30,7 @@ import com.vaadin.terminal.Resource; import com.vaadin.terminal.Vaadin6Component; import com.vaadin.terminal.WrappedRequest; import com.vaadin.terminal.WrappedRequest.BrowserDetails; +import com.vaadin.terminal.gwt.client.ComponentState; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.ui.notification.VNotification; import com.vaadin.terminal.gwt.client.ui.root.RootServerRPC; @@ -473,6 +474,13 @@ public abstract class Root extends AbstractComponentContainer implements return (RootState) super.getState(); } + @Override + protected ComponentState createState() { + // This is a workaround for a problem with creating the correct state + // object during build + return new RootState(); + } + /** * Overridden to return a value instead of referring to the parent. * -- 2.39.5