summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-09-15 10:43:27 +0300
committerArtur Signell <artur@vaadin.com>2016-09-15 07:59:24 +0000
commit516c428ca127e3c31b7b4d74220e4b7eed4571be (patch)
treec55b2e4f084f90cc01fc3a414da34ca8e7f271a7
parent815d72115d5aaf3676daefd5642115577e4151ef (diff)
downloadvaadin-framework-516c428ca127e3c31b7b4d74220e4b7eed4571be.tar.gz
vaadin-framework-516c428ca127e3c31b7b4d74220e4b7eed4571be.zip
Use widget set specified by init parameter (#20276)
1. If a UI has @Widgetset, use that 2. If a "widgetset" init parameter has been specified, use that 3. If there is an AppWidgetset, use that 4. Use DefaultWidgetSet Change-Id: I522210220bb9e3eb339e9d226833d0fa8eb65839
-rw-r--r--server/src/main/java/com/vaadin/server/UIProvider.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/src/main/java/com/vaadin/server/UIProvider.java b/server/src/main/java/com/vaadin/server/UIProvider.java
index 31a6f2a662..6cff6f9be2 100644
--- a/server/src/main/java/com/vaadin/server/UIProvider.java
+++ b/server/src/main/java/com/vaadin/server/UIProvider.java
@@ -178,15 +178,22 @@ public abstract class UIProvider implements Serializable {
return new WidgetsetInfoImpl(uiWidgetset.value());
}
+ // Second case: We might have an init parameter, use that
+ String initParameterWidgetSet = event.getService()
+ .getDeploymentConfiguration().getWidgetset(null);
+ if (initParameterWidgetSet != null) {
+ return new WidgetsetInfoImpl(initParameterWidgetSet);
+ }
+
// Find the class AppWidgetset in the default package if one exists
WidgetsetInfo info = getWidgetsetClassInfo();
- // Second case: we have a generated class called APP_WIDGETSET_NAME
+ // Third case: we have a generated class called APP_WIDGETSET_NAME
if (info != null) {
return info;
}
- // third case: we have an AppWidgetset.gwt.xml file
+ // Fourth case: we have an AppWidgetset.gwt.xml file
else {
InputStream resource = event.getUIClass().getResourceAsStream(
"/" + APP_WIDGETSET_NAME + ".gwt.xml");