diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-08-31 12:14:52 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-08-31 19:00:01 +0300 |
commit | f85c152a48686a8a0dca38ca12b4f3509cac056f (patch) | |
tree | 3f4e9946dd30e0b12a3613dd8131540f561fa039 /server | |
parent | 8679f49c5e036d39d34a9fca8a907c4d19df21c9 (diff) | |
download | vaadin-framework-f85c152a48686a8a0dca38ca12b4f3509cac056f.tar.gz vaadin-framework-f85c152a48686a8a0dca38ca12b4f3509cac056f.zip |
Remove @EagerInit (#9445)
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/Application.java | 7 | ||||
-rw-r--r-- | server/src/com/vaadin/annotations/EagerInit.java | 42 | ||||
-rw-r--r-- | server/src/com/vaadin/server/BootstrapHandler.java | 7 | ||||
-rw-r--r-- | server/src/com/vaadin/server/WrappedRequest.java | 4 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/UI.java | 14 |
5 files changed, 3 insertions, 71 deletions
diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java index b1a9ae1d26..cd34fb7540 100644 --- a/server/src/com/vaadin/Application.java +++ b/server/src/com/vaadin/Application.java @@ -40,7 +40,6 @@ import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.vaadin.annotations.EagerInit; import com.vaadin.annotations.PreserveOnRefresh; import com.vaadin.annotations.Theme; import com.vaadin.annotations.Title; @@ -2287,10 +2286,4 @@ public class Application implements Terminal.ErrorListener, Serializable { return titleAnnotation.value(); } } - - public boolean isEagerInit(WrappedRequest request, - Class<? extends UI> uiClass) { - EagerInit eagerInit = getAnnotationFor(uiClass, EagerInit.class); - return eagerInit != null; - } } diff --git a/server/src/com/vaadin/annotations/EagerInit.java b/server/src/com/vaadin/annotations/EagerInit.java deleted file mode 100644 index f08d46b551..0000000000 --- a/server/src/com/vaadin/annotations/EagerInit.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2011 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import com.vaadin.server.WrappedRequest; -import com.vaadin.ui.UI; - -/** - * Indicates that the init method in a UI class can be called before full - * browser details ({@link WrappedRequest#getBrowserDetails()}) are available. - * This will make the UI appear more quickly, as ensuring the availability of - * this information typically requires an additional round trip to the client. - * - * @see UI#init(com.vaadin.server.WrappedRequest) - * @see WrappedRequest#getBrowserDetails() - * - * @since 7.0 - * - */ -@Target(ElementType.TYPE) -@Retention(RetentionPolicy.RUNTIME) -public @interface EagerInit { - // No values -} diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java index 2b31d5d3bc..60ac40916c 100644 --- a/server/src/com/vaadin/server/BootstrapHandler.java +++ b/server/src/com/vaadin/server/BootstrapHandler.java @@ -406,13 +406,6 @@ public abstract class BootstrapHandler implements RequestHandler { appConfig.put("widgetset", context.getWidgetsetName()); - if (application.isEagerInit(context.getRequest(), context.getUIClass())) { - throw new RuntimeException( - "Eager UI init is currently not supported"); - // write the initial UIDL into the config - // appConfig.put("uidl", - // getInitialUIDL(context.getRequest(), context.getUI())); - } appConfig.put("initialPath", context.getRequest().getRequestPathInfo()); Map<String, String[]> parameterMap = context.getRequest() diff --git a/server/src/com/vaadin/server/WrappedRequest.java b/server/src/com/vaadin/server/WrappedRequest.java index e95b2d599b..0714f73cad 100644 --- a/server/src/com/vaadin/server/WrappedRequest.java +++ b/server/src/com/vaadin/server/WrappedRequest.java @@ -26,7 +26,6 @@ import javax.portlet.PortletRequest; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; -import com.vaadin.annotations.EagerInit; import com.vaadin.ui.UI; /** @@ -216,8 +215,7 @@ public interface WrappedRequest extends Serializable { * for instance using javascript in the browser. * * This information is only guaranteed to be available in some special - * cases, for instance in {@link UI#init(WrappedRequest)} for a UI class not - * annotated with {@link EagerInit} + * cases, for instance in {@link UI#init(WrappedRequest)}. * * @return the browser details, or <code>null</code> if details are not * available diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index b6ac271942..d1ccaacde3 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -28,7 +28,6 @@ import java.util.LinkedHashSet; import java.util.Map; import com.vaadin.Application; -import com.vaadin.annotations.EagerInit; import com.vaadin.event.Action; import com.vaadin.event.Action.Handler; import com.vaadin.event.ActionManager; @@ -77,12 +76,6 @@ import com.vaadin.tools.ReflectTools; * passing a {@link ComponentContainer} with the main layout of the view to * {@link #setContent(ComponentContainer)}. * </p> - * <p> - * If a {@link EagerInit} annotation is present on a class extending - * <code>UI</code>, 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. - * </p> * * @see #init(WrappedRequest) * @see Application#createUI(WrappedRequest) @@ -961,11 +954,8 @@ public abstract class UI extends AbstractComponentContainer implements * state of the UI is not properly set up when the constructor is invoked. * <p> * The {@link WrappedRequest} can be used to get information about the - * request that caused this UI to be created. By default, the - * {@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 UI class. + * request that caused this UI to be created. {@link BrowserDetails} will be + * available in the request. * </p> * * @param request |