From 3320dd0eee5d93d73de3eafcc6774b5cb38ea98b Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Thu, 3 Jul 2014 14:02:14 +0300 Subject: Revert "Allow changing theme on the fly (#2874)" This reverts commit 1b73b00b2875c5eafa3c641b77f5d9efc2f7d929 as well as the related changes to @since, release notes etc. Conflicts: client/src/com/vaadin/client/ResourceLoader.java client/src/com/vaadin/client/communication/TranslatedURLReference.java client/src/com/vaadin/client/ui/ui/UIConnector.java server/src/com/vaadin/ui/UI.java shared/src/com/vaadin/shared/ui/ui/UIState.java uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java Change-Id: Id882dc730f51055f6d17200964bcaf8a1f87a35f --- server/src/com/vaadin/ui/UI.java | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'server/src/com/vaadin/ui/UI.java') diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 6f27a13826..a72cbe5c30 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -549,6 +549,8 @@ public abstract class UI extends AbstractSingleComponentContainer implements private boolean resizeLazy = false; + private String theme; + private Navigator navigator; private PushConnection pushConnection = null; @@ -631,7 +633,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements this.embedId = embedId; // Actual theme - used for finding CustomLayout templates - getState(false).theme = request.getParameter("theme"); + theme = request.getParameter("theme"); getPage().init(request); @@ -1133,31 +1135,12 @@ public abstract class UI extends AbstractSingleComponentContainer implements } /** - * Gets the theme currently in use by this UI + * Gets the theme that was used when the UI was initialized. * * @return the theme name */ public String getTheme() { - return getState(false).theme; - } - - /** - * Sets the theme currently in use by this UI - *

- * Calling this method will remove the old theme (CSS file) from the - * application and add the new theme. - *

- * Note that this method is NOT SAFE to call in a portal environment or - * other environment where there are multiple UIs on the same page. The old - * CSS file will be removed even if there are other UIs on the page which - * are still using it. - * - * @since 7.3 - * @param theme - * The new theme name - */ - public void setTheme(String theme) { - getState().theme = theme; + return theme; } /** -- cgit v1.2.3