From d9f5e4c8054fa3d99f30640c9ac44eb8e850fe50 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Thu, 22 Dec 2011 11:23:20 +0200 Subject: Change the default to a two request bootstrap Add @EagerInit annotation to indicate that that no browser details are required, enabling a one request bootstrap. --- src/com/vaadin/ui/Root.java | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'src/com/vaadin/ui') diff --git a/src/com/vaadin/ui/Root.java b/src/com/vaadin/ui/Root.java index 1a67edebde..4998baf90f 100644 --- a/src/com/vaadin/ui/Root.java +++ b/src/com/vaadin/ui/Root.java @@ -18,7 +18,7 @@ import java.util.List; import java.util.Map; import com.vaadin.Application; -import com.vaadin.annotations.RootInitRequiresBrowserDetails; +import com.vaadin.annotations.EagerInit; import com.vaadin.event.Action; import com.vaadin.event.Action.Handler; import com.vaadin.event.ActionManager; @@ -60,9 +60,10 @@ import com.vaadin.ui.Window.CloseListener; * {@link #setContent(ComponentContainer)}. *

*

- * If a {@link RootInitRequiresBrowserDetails} annotation is present on a class - * extending Root, the framework will ensure {@link BrowserDetails} - * are present in the {@link WrappedRequest} passed to the init method. + * If a {@link EagerInit} annotation is present on a class extending + * Root, the framework will use a faster initialization method + * which will not ensure that {@link BrowserDetails} are present in the + * {@link WrappedRequest} passed to the init method. *

* * @see #init(WrappedRequest) @@ -193,6 +194,15 @@ public abstract class Root extends AbstractComponentContainer implements * Helper class to emulate the main window from Vaadin 6 using roots. This * class should be used in the same way as Window used as a browser level * window in Vaadin 6 together with {@Application.LegacyApplication + * + * + * + * + * + * + * + * + * * } */ @Deprecated @@ -1092,9 +1102,10 @@ public abstract class Root extends AbstractComponentContainer implements *

* The {@link WrappedRequest} can be used to get information about the * request that caused this root to be created. By default, the - * {@link BrowserDetails} are note guaranteed to be available in the - * request. Availability of the browser details can be requested by adding - * the {@link RootInitRequiresBrowserDetails} annotation to the class. + * {@link BrowserDetails} will be available in the request. If the browser + * details are not required, loading the application in the browser can take + * some shortcuts giving a faster initial rendering. This can be indicated + * by adding the {@link EagerInit} annotation to the Root class. *

* * @param request -- cgit v1.2.3