List of usage examples for com.vaadin.server VaadinSession UI_PARAMETER
String UI_PARAMETER
To view the source code for com.vaadin.server VaadinSession UI_PARAMETER.
Click Source Link
From source file:com.github.mcollovati.vertx.vaadin.VaadinVerticle.java
License:Open Source License
private void readUiFromEnclosingClass(JsonObject vaadinConfig) { Class<?> enclosingClass = getClass().getEnclosingClass(); if (enclosingClass != null && UI.class.isAssignableFrom(enclosingClass)) { vaadinConfig.put(VaadinSession.UI_PARAMETER, enclosingClass.getName()); }/*from w ww. jav a2s . co m*/ }
From source file:com.haulmont.cuba.web.sys.CubaApplicationServlet.java
License:Apache License
@Override protected DeploymentConfiguration createDeploymentConfiguration(Properties initParameters) { int sessionExpirationTimeout = webConfig.getHttpSessionExpirationTimeoutSec(); int sessionPingPeriod = sessionExpirationTimeout / 3; if (Strings.isNullOrEmpty(initParameters.getProperty(Constants.SERVLET_PARAMETER_HEARTBEAT_INTERVAL))) { if (sessionPingPeriod > 0) { // configure Vaadin heartbeat according to web config initParameters.setProperty(Constants.SERVLET_PARAMETER_HEARTBEAT_INTERVAL, String.valueOf(sessionPingPeriod)); }//from w w w . ja v a 2 s .c o m } if (Strings.isNullOrEmpty(initParameters.getProperty(Constants.PARAMETER_WIDGETSET))) { String widgetSet = webConfig.getWidgetSet(); initParameters.setProperty(Constants.PARAMETER_WIDGETSET, widgetSet); } if (Strings.isNullOrEmpty(initParameters.getProperty(Constants.SERVLET_PARAMETER_PRODUCTION_MODE))) { boolean productionMode = webConfig.getProductionMode(); if (productionMode) { initParameters.setProperty(Constants.SERVLET_PARAMETER_PRODUCTION_MODE, String.valueOf(true)); } } if (Strings.isNullOrEmpty(initParameters.getProperty(Constants.SERVLET_PARAMETER_UI_PROVIDER))) { initParameters.setProperty(Constants.SERVLET_PARAMETER_UI_PROVIDER, CubaUIProvider.class.getCanonicalName()); } if (Strings.isNullOrEmpty(initParameters.getProperty(VaadinSession.UI_PARAMETER))) { // not actually used by CubaUIProvider initParameters.setProperty(VaadinSession.UI_PARAMETER, AppUI.class.getCanonicalName()); } return super.createDeploymentConfiguration(initParameters); }
From source file:org.gluewine.vaadin.GluewineVaadinUI.java
License:Apache License
/** * Initializes the VaadinServlet and registers it with the Jetty instance. *//*w ww. jav a 2 s. c o m*/ @RunOnActivate public void intialize() { VaadinServlet servlet = new VaadinServlet(); Map<String, String> params = new HashMap<String, String>(); params.put(VaadinSession.UI_PARAMETER, getUnEnhancedClassName()); Enumeration<?> keys = props.propertyNames(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); params.put(key, props.getProperty(key)); } launcher.register(context, servlet, params); }