diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-04-20 17:21:05 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-04-20 17:22:24 +0300 |
commit | b2f283b414129407f4e839470380e5e5d0383fb4 (patch) | |
tree | 70603ca58172a67f465e519a69ee489838cde784 /server | |
parent | fe530b84f06f4103a6499a13ac7c66cdb3c3cfd9 (diff) | |
parent | 3ea002e67fa0745080b844c8e29a6b55e8bac27b (diff) | |
download | vaadin-framework-b2f283b414129407f4e839470380e5e5d0383fb4.tar.gz vaadin-framework-b2f283b414129407f4e839470380e5e5d0383fb4.zip |
Merge remote-tracking branch 'origin/feature/appwidgetset'
Change-Id: I2136f2790d780e762736334145b0addaf2194d11
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/server/DefaultDeploymentConfiguration.java | 14 | ||||
-rw-r--r-- | server/src/com/vaadin/server/UIProvider.java | 12 |
2 files changed, 21 insertions, 5 deletions
diff --git a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java index b26e048431..1f22a9e33d 100644 --- a/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java +++ b/server/src/com/vaadin/server/DefaultDeploymentConfiguration.java @@ -125,14 +125,14 @@ public class DefaultDeploymentConfiguration extends String defaultValue) { String val = null; - // Try application properties - val = getApplicationProperty(propertyName); + // Try system properties + val = getSystemProperty(propertyName); if (val != null) { return val; } - // Try system properties - val = getSystemProperty(propertyName); + // Try application properties + val = getApplicationProperty(propertyName); if (val != null) { return val; } @@ -175,6 +175,12 @@ public class DefaultDeploymentConfiguration extends // Try lowercased system properties val = System.getProperty(pkgName + parameterName.toLowerCase()); + if (val != null) { + return val; + } + + // version prefixed with just "vaadin." + val = System.getProperty("vaadin." + parameterName); return val; } 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<? extends UI> 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; } /** |