From aa2a9f7c6346357381db6f7f042ac54da382de00 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Mon, 14 Mar 2016 15:53:22 +0200 Subject: Add a default widgetset to look for in the project (#19675) Change-Id: I39c303885b5712476780cb8fb7814763610eab47 --- server/src/com/vaadin/server/UIProvider.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/src/com/vaadin/server/UIProvider.java b/server/src/com/vaadin/server/UIProvider.java index 4ed86b9c31..7fd880919e 100644 --- a/server/src/com/vaadin/server/UIProvider.java +++ b/server/src/com/vaadin/server/UIProvider.java @@ -16,6 +16,7 @@ package com.vaadin.server; +import java.io.InputStream; import java.io.Serializable; import java.lang.annotation.Annotation; import java.lang.annotation.Inherited; @@ -30,6 +31,10 @@ import com.vaadin.shared.ui.ui.Transport; import com.vaadin.ui.UI; public abstract class UIProvider implements Serializable { + + /* Default widgetset name to look for */ + private static final String APP_WIDGETSET_NAME = "AppWidgetset"; + public abstract Class getUIClass(UIClassSelectionEvent event); public UI createInstance(UICreateEvent event) { @@ -136,8 +141,13 @@ public abstract class UIProvider implements Serializable { if (uiWidgetset != null) { return uiWidgetset.value(); } else { - return null; + InputStream resource = event.getUIClass().getResourceAsStream( + "/" + APP_WIDGETSET_NAME + ".gwt.xml"); + if (resource != null) { + return APP_WIDGETSET_NAME; + } } + return null; } /** -- cgit v1.2.3 From 3ea002e67fa0745080b844c8e29a6b55e8bac27b Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Wed, 16 Mar 2016 12:22:55 +0200 Subject: Allow system properties to override app properties (#19683) This enables e.g. overriding the productionMode setting on a server with -DproductionMode=true. This change also allows the use of system properties prefixed with "vaadin." or the full package name of the actual servlet class. Change-Id: I196ae71f9d88222f98fe360add3e7038914b79d6 --- WebContent/release-notes.html | 1 + .../com/vaadin/server/DefaultDeploymentConfiguration.java | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html index fc1d69fd24..828aa193b9 100644 --- a/WebContent/release-notes.html +++ b/WebContent/release-notes.html @@ -144,6 +144,7 @@ @Inherited. The annotation is also looked up in extended interfaces for backwards compatibility.
  • Server-side timings of request processing are only sent to the client when not in production mode. Using the timings in TestBench tests requires the server not to be in production mode.
  • +
  • System properties now override application parameters for settings such as production mode.
  • Known Issues and Limitations