From: Artur Signell Date: Wed, 11 Apr 2012 17:54:58 +0000 (+0300) Subject: Workaround for problem with wrong state being created X-Git-Tag: 7.0.0.alpha2~77 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e55ee60d44d4397ff605aef2b37dbec7aa99f742;p=vaadin-framework.git Workaround for problem with wrong state being created --- 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. *