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;
return titleAnnotation.value();
}
}
-
- public boolean isEagerInit(WrappedRequest request,
- Class<? extends UI> uiClass) {
- EagerInit eagerInit = getAnnotationFor(uiClass, EagerInit.class);
- return eagerInit != null;
- }
}
+++ /dev/null
-/*
- * 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
-}
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()
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
-import com.vaadin.annotations.EagerInit;
import com.vaadin.ui.UI;
/**
* 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
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;
* 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)
* 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
package com.vaadin.tests.components.ui;
import com.vaadin.Application;
-import com.vaadin.annotations.EagerInit;
import com.vaadin.server.ExternalResource;
import com.vaadin.server.UIProvider;
import com.vaadin.server.WrappedRequest;
public class LazyInitUIs extends AbstractTestApplication {
- @EagerInit
+ // @EagerInit
private static class EagerInitUI extends UI {
@Override
public void init(WrappedRequest request) {