You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2017/10/13 07:30:12 UTC
[myfaces-tobago] 02/04: Demo: * cleanup theme handling
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit 41e9e1ebf6371efd505d9cb8660eb6969790b96f
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Oct 12 16:27:45 2017 +0200
Demo:
* cleanup theme handling
---
.../myfaces/tobago/context/TobagoContext.java | 3 +-
.../{test => demo}/ClientConfigController.java | 82 +++------
.../ClientConfigPhaseListener.java | 25 ++-
.../tobago/example/demo/ThemeController.java | 17 +-
.../demo/clientConfig/ClientConfigController.java | 201 ---------------------
.../src/main/webapp/WEB-INF/faces-config.xml | 24 ---
.../webapp/content/30-concept/10-theme/theme.xhtml | 36 ++--
.../content/30-concept/14-locale/locale.xhtml | 6 +-
.../src/main/webapp/image/standard/theme-photo.jpg | Bin 3772 -> 47875 bytes
.../tobago-example-demo/src/main/webapp/main.xhtml | 2 +-
.../tobago-example-demo/src/main/webapp/menu.xhtml | 6 +-
11 files changed, 79 insertions(+), 323 deletions(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoContext.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoContext.java
index d67551b..1df4d15 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoContext.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/TobagoContext.java
@@ -30,10 +30,11 @@ import javax.faces.bean.RequestScoped;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
+import java.io.Serializable;
@ManagedBean
@RequestScoped
-public class TobagoContext {
+public class TobagoContext implements Serializable {
public static final String BEAN_NAME = "tobagoContext";
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/ClientConfigController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ClientConfigController.java
similarity index 62%
rename from tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/ClientConfigController.java
rename to tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ClientConfigController.java
index b71eeea..2af1878 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/test/ClientConfigController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ClientConfigController.java
@@ -17,68 +17,54 @@
* under the License.
*/
-package org.apache.myfaces.tobago.example.test;
+package org.apache.myfaces.tobago.example.demo;
-import org.apache.myfaces.tobago.config.TobagoConfig;
-import org.apache.myfaces.tobago.context.Theme;
-import org.apache.myfaces.tobago.context.TobagoContext;
-import org.apache.myfaces.tobago.internal.util.ObjectUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import javax.faces.application.Application;
+import javax.faces.bean.SessionScoped;
+import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
+import javax.inject.Named;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
+@Named
+@SessionScoped
public class ClientConfigController implements Serializable {
- private Theme theme;
- private SelectItem[] themeItems;
+ private static final Logger LOG = LoggerFactory.getLogger(ClientConfigController.class);
private Locale locale;
public ClientConfigController() {
- // theme
-
final FacesContext facesContext = FacesContext.getCurrentInstance();
- final TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);
-
- final List<Theme> themes = new ArrayList<>(tobagoConfig.getSupportedThemes());
- themes.add(0, tobagoConfig.getDefaultTheme());
- themeItems = new SelectItem[themes.size()];
- for (int i = 0; i < themeItems.length; i++) {
- final Theme themeItem = themes.get(i);
- themeItems[i] = new SelectItem(themeItem, themeItem.getDisplayName());
- }
// locale
- locale = facesContext.getViewRoot().getLocale();
-
- // load
-
- loadFromClientProperties();
+ final UIViewRoot viewRoot = facesContext.getViewRoot();
+ if (viewRoot != null) {
+ locale = viewRoot.getLocale();
+ } else {
+ locale = facesContext.getApplication().getDefaultLocale();
+ }
}
public String submit() {
- storeInClientProperties();
- return "navigation";
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("invoke!!!");
+ }
+ return null;
}
// ///////////////////////////////////////////// logic
- public void storeInClientProperties() {
- TobagoContext.getInstance(FacesContext.getCurrentInstance()).setTheme(theme);
- }
-
- public void loadFromClientProperties() {
- theme = TobagoContext.getInstance(FacesContext.getCurrentInstance()).getTheme();
- }
-
public List<SelectItem> getLocaleItems() {
final FacesContext facesContext = FacesContext.getCurrentInstance();
final Application application = facesContext.getApplication();
@@ -111,30 +97,10 @@ public class ClientConfigController implements Serializable {
}
}
- public Theme getTheme() {
- return theme;
- }
-
- public String getLocalizedTheme() {
- for (int i = 0; i < themeItems.length; i++) {
- final SelectItem themeItem = themeItems[i];
- if (ObjectUtils.equals(themeItem.getValue(), theme)) {
- return themeItem.getLabel();
- }
- }
- return "???";
- }
-
- public void setTheme(final Theme theme) {
- this.theme = theme;
- }
-
- public SelectItem[] getThemeItems() {
- return themeItems;
- }
-
- public void setThemeItems(final SelectItem[] themeItems) {
- this.themeItems = themeItems;
+ public static ClientConfigController getCurrentInstance(
+ final FacesContext facesContext, final String beanName) {
+ return (ClientConfigController) facesContext.getApplication()
+ .getVariableResolver().resolveVariable(facesContext, beanName);
}
public Locale getLocale() {
@@ -144,7 +110,7 @@ public class ClientConfigController implements Serializable {
public String getLocalizedLocale() {
if (locale != null) {
return locale.getDisplayName(locale);
- } else{
+ } else {
return null;
}
}
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ClientConfigPhaseListener.java
similarity index 70%
rename from tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java
rename to tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ClientConfigPhaseListener.java
index d419b09..6f05f83 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ClientConfigPhaseListener.java
@@ -17,8 +17,11 @@
* under the License.
*/
-package org.apache.myfaces.tobago.example.demo.clientConfig;
+package org.apache.myfaces.tobago.example.demo;
+import org.apache.myfaces.tobago.context.TobagoContext;
+
+import javax.el.ELResolver;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
@@ -26,9 +29,6 @@ import javax.faces.event.PhaseListener;
public class ClientConfigPhaseListener implements PhaseListener {
- public static final String[] BEAN_NAMES
- = {"clientConfigController", "clientConfigController2"};
-
@Override
public void afterPhase(final PhaseEvent event) {
}
@@ -36,15 +36,14 @@ public class ClientConfigPhaseListener implements PhaseListener {
@Override
public void beforePhase(final PhaseEvent event) {
final FacesContext facesContext = FacesContext.getCurrentInstance();
- for (int i = 0; i < BEAN_NAMES.length; i++) {
- final String beanName = BEAN_NAMES[i];
- final ClientConfigController controller = ClientConfigController
- .getCurrentInstance(facesContext, beanName);
-
- if (controller != null) {
- controller.loadFromTobagoContext();
- }
- }
+ final ELResolver elResolver = facesContext.getELContext().getELResolver();
+
+ final ThemeController themeController = (ThemeController)
+ elResolver.getValue(facesContext.getELContext(), null, "themeController");
+ final TobagoContext tobagoContext = (TobagoContext)
+ elResolver.getValue(facesContext.getELContext(), null, "tobagoContext");
+
+// themeController.setTheme(tobagoContext.getTheme());
}
@Override
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ThemeController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ThemeController.java
index 8d5995e..2c07c49 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ThemeController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ThemeController.java
@@ -22,6 +22,7 @@ package org.apache.myfaces.tobago.example.demo;
import org.apache.myfaces.tobago.config.TobagoConfig;
import org.apache.myfaces.tobago.context.Theme;
import org.apache.myfaces.tobago.context.TobagoContext;
+import org.apache.myfaces.tobago.internal.util.ObjectUtils;
import javax.enterprise.context.SessionScoped;
import javax.faces.context.FacesContext;
@@ -48,6 +49,7 @@ public class ThemeController implements Serializable {
final Theme themeItem = themes.get(i);
themeItems[i] = new SelectItem(themeItem, themeItem.getDisplayName());
}
+ theme = TobagoContext.getInstance(facesContext).getTheme();
}
public Theme getTheme() {
@@ -67,8 +69,19 @@ public class ThemeController implements Serializable {
}
public String submit() {
- final TobagoContext tobagoContext = TobagoContext.getInstance(FacesContext.getCurrentInstance());
- tobagoContext.setTheme(theme);
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ TobagoContext.getInstance(facesContext).setTheme(theme);
return null;
}
+
+ public String getLocalizedTheme() {
+ for (int i = 0; i < themeItems.length; i++) {
+ final SelectItem themeItem = themeItems[i];
+ if (ObjectUtils.equals(themeItem.getValue(), theme)) {
+ return themeItem.getLabel();
+ }
+ }
+ return "???";
+ }
+
}
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java
deleted file mode 100644
index 06c0fa7..0000000
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.myfaces.tobago.example.demo.clientConfig;
-
-import org.apache.myfaces.tobago.config.TobagoConfig;
-import org.apache.myfaces.tobago.context.Theme;
-import org.apache.myfaces.tobago.context.TobagoContext;
-import org.apache.myfaces.tobago.internal.util.ObjectUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.faces.application.Application;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.model.SelectItem;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-
-public class ClientConfigController {
-
- private static final Logger LOG = LoggerFactory.getLogger(ClientConfigController.class);
-
- private Theme theme;
- private SelectItem[] themeItems;
-
- private Locale locale;
-
- public ClientConfigController() {
-
- // theme
-
- final FacesContext facesContext = FacesContext.getCurrentInstance();
- final TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);
-
- final List<Theme> themes = new ArrayList<>(tobagoConfig.getSupportedThemes());
- themes.add(0, tobagoConfig.getDefaultTheme());
- themeItems = new SelectItem[themes.size()];
- for (int i = 0; i < themeItems.length; i++) {
- final Theme themeItem = themes.get(i);
- themeItems[i] = new SelectItem(themeItem, themeItem.getDisplayName());
- }
-
- // locale
-
- final UIViewRoot viewRoot = facesContext.getViewRoot();
- if (viewRoot != null) {
- locale = viewRoot.getLocale();
- } else {
- locale = facesContext.getApplication().getDefaultLocale();
- }
-
- // load
-
- loadFromTobagoContext();
- }
-
- public String submit() {
- if (LOG.isDebugEnabled()) {
- LOG.debug("invoke!!!");
- }
- final FacesContext facesContext = FacesContext.getCurrentInstance();
-
- storeInTobagoContext();
-
- for (int i = 0; i < ClientConfigPhaseListener.BEAN_NAMES.length; i++) {
- final String beanName = ClientConfigPhaseListener.BEAN_NAMES[i];
- final ClientConfigController controller
- = getCurrentInstance(facesContext, beanName);
- if (controller != null) {
- controller.setLocale(locale);
- }
- }
-
- return null;
- }
-
-/*
- public String resetTheme() {
- final ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
- final Object request = externalContext.getRequest();
- final Object response = externalContext.getResponse();
- if (response instanceof HttpServletResponse && request instanceof HttpServletRequest) {
- CookieUtils.removeThemeNameCookie((HttpServletRequest) request, (HttpServletResponse) response);
- }
-
- return null;
- }
-*/
-
-// ///////////////////////////////////////////// logic
-
- public void storeInTobagoContext() {
- final TobagoContext tobagoContext = TobagoContext.getInstance(FacesContext.getCurrentInstance());
- tobagoContext.setTheme(theme);
- }
-
- public void loadFromTobagoContext() {
- final TobagoContext tobagoContext = TobagoContext.getInstance(FacesContext.getCurrentInstance());
- theme = tobagoContext.getTheme();
- }
-
- public List<SelectItem> getLocaleItems() {
- final FacesContext facesContext = FacesContext.getCurrentInstance();
- final Application application = facesContext.getApplication();
- final Locale defaultLocale = application.getDefaultLocale();
- final Iterator supportedLocales = application.getSupportedLocales();
-
- boolean defaultInList = false;
- final List<SelectItem> localeItems = new ArrayList<>();
- while (supportedLocales.hasNext()) {
- final Locale locale = (Locale) supportedLocales.next();
- localeItems.add(createLocaleItem(locale));
- if (locale.equals(defaultLocale)) {
- defaultInList = true;
- }
- }
- // If the default is already in the list, don't add it.
- // Background: Must the default be in the supported list? Yes or No?
- // This question is not specified explicit and different implemented in the RI and MyFaces
- if (!defaultInList && defaultLocale != null) {
- localeItems.add(0, createLocaleItem(defaultLocale));
- }
- return localeItems;
- }
-
- private SelectItem createLocaleItem(final Locale localeItem) {
- if (locale != null) {
- return new SelectItem(localeItem, localeItem.getDisplayName(locale));
- } else {
- return new SelectItem(localeItem, localeItem.getDisplayName(localeItem));
- }
- }
-
- public static ClientConfigController getCurrentInstance(
- final FacesContext facesContext, final String beanName) {
- return (ClientConfigController) facesContext.getApplication()
- .getVariableResolver().resolveVariable(facesContext, beanName);
- }
-
- public Theme getTheme() {
- return theme;
- }
-
- public String getLocalizedTheme() {
- for (int i = 0; i < themeItems.length; i++) {
- final SelectItem themeItem = themeItems[i];
- if (ObjectUtils.equals(themeItem.getValue(), theme)) {
- return themeItem.getLabel();
- }
- }
- return "???";
- }
-
- public void setTheme(final Theme theme) {
- this.theme = theme;
- }
-
- public SelectItem[] getThemeItems() {
- return themeItems;
- }
-
- public void setThemeItems(final SelectItem[] themeItems) {
- this.themeItems = themeItems;
- }
-
- public Locale getLocale() {
- return locale;
- }
-
- public String getLocalizedLocale() {
- if (locale != null) {
- return locale.getDisplayName(locale);
- } else{
- return null;
- }
- }
-
- public void setLocale(final Locale locale) {
- this.locale = locale;
- }
-
-}
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
index 0348684..1abeae8 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
@@ -59,24 +59,6 @@
<!--<phase-listener>org.apache.myfaces.tobago.util.DebugPhaseListener</phase-listener>-->
</lifecycle>
- <lifecycle>
- <phase-listener>
- org.apache.myfaces.tobago.example.demo.clientConfig.ClientConfigPhaseListener
- </phase-listener>
- </lifecycle>
-
- <managed-bean>
- <managed-bean-name>clientConfigController</managed-bean-name>
- <managed-bean-class>org.apache.myfaces.tobago.example.demo.clientConfig.ClientConfigController</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
- <managed-bean-name>clientConfigController2</managed-bean-name>
- <managed-bean-class>org.apache.myfaces.tobago.example.demo.clientConfig.ClientConfigController</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
<!-- old test classes BEGIN -->
<managed-bean>
@@ -86,12 +68,6 @@
</managed-bean>
<managed-bean>
- <managed-bean-name>clientConfig</managed-bean-name>
- <managed-bean-class>org.apache.myfaces.tobago.example.test.ClientConfigController</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
<managed-bean-name>in</managed-bean-name>
<managed-bean-class>org.apache.myfaces.tobago.example.test.InBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/10-theme/theme.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/10-theme/theme.xhtml
index 570c084..c634e17 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/10-theme/theme.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/10-theme/theme.xhtml
@@ -25,24 +25,26 @@
<ui:param name="title" value="#{demoBundle.theme}"/>
<p>Tobago supports a big variety of displaying controls, so called designs or themes.</p>
- <tc:section label="Change Theme">
- <p>Choosing of themes can be application wide, user or group specific.
- Images and other resources can be theme dependant as well as the application pages can be designed seperatly
- for each supported theme.</p>
- <tc:selectOneChoice label="Theme" value="#{themeController.theme}">
- <f:selectItems value="#{themeController.themeItems}"/>
- </tc:selectOneChoice>
- <tc:button label="Submit" action="#{themeController.submit}"/>
+ <tc:form id="theme">
+ <tc:section label="Change Theme">
+ <p>Choosing of themes can be application wide, user or group specific.
+ Images and other resources can be theme dependant as well as the application pages can be designed seperatly
+ for each supported theme.</p>
+ <tc:selectOneChoice label="Theme" value="#{themeController.theme}">
+ <f:selectItems value="#{themeController.themeItems}"/>
+ </tc:selectOneChoice>
+ <tc:button label="Submit" action="#{themeController.submit}"/>
- <tc:separator/>
- <tc:figure>
- <f:facet name="label">
- <!-- todo: theme dependent text -->
- <tc:out id="o1" value="#{demoBundle.theme_photo} (TODO: theme dependent text)"/>
- </f:facet>
- <tc:image value="/image/#{tobagoContext.theme.name}/theme-photo.jpg"/>
- </tc:figure>
- </tc:section>
+ <tc:separator/>
+ <tc:figure>
+ <f:facet name="label">
+ <!-- todo: theme dependent text -->
+ <tc:out id="o1" value="#{demoBundle.theme_photo} (TODO: theme dependent text)"/>
+ </f:facet>
+ <tc:image value="/image/#{tobagoContext.theme.name}/theme-photo.jpg"/>
+ </tc:figure>
+ </tc:section>
+ </tc:form>
<tc:section label="Configuration">
<p>In Tobago it's easy to give an application a well designed look. You can use prepared themes like 'speyside' or
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml
index 4f31434..72d1a98 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/14-locale/locale.xhtml
@@ -26,9 +26,9 @@
<tc:out escape="false" value="#{demoBundle.locale_text}"/>
- <tc:selectOneChoice value="#{clientConfigController2.locale}"
+ <tc:selectOneChoice value="#{clientConfigController.locale}"
label="#{demoBundle.locale}">
- <f:selectItems value="#{clientConfigController2.localeItems}"/>
+ <f:selectItems value="#{clientConfigController.localeItems}"/>
</tc:selectOneChoice>
<tc:gridLayout columns="100px;*;100px">
@@ -41,7 +41,7 @@
<tc:gridLayout rows="*;auto "/>
<tc:panel/>
- <tc:button action="#{clientConfigController2.submit}" label="#{demoBundle.locale_submit}"/>
+ <tc:button action="#{clientConfigController.submit}" label="#{demoBundle.locale_submit}"/>
</tc:panel>
</tc:gridLayout>
</tc:gridLayout>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/image/standard/theme-photo.jpg b/tobago-example/tobago-example-demo/src/main/webapp/image/standard/theme-photo.jpg
index 6ba090e..d6b3254 100644
Binary files a/tobago-example/tobago-example-demo/src/main/webapp/image/standard/theme-photo.jpg and b/tobago-example/tobago-example-demo/src/main/webapp/image/standard/theme-photo.jpg differ
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/main.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/main.xhtml
index fe59984..2d1a6cd 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/main.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/main.xhtml
@@ -79,7 +79,7 @@
<tc:operation name="hide" for="info"/>
</tc:button>
</f:facet>
- <tc:out label="Theme:" value="#{clientConfigController.localizedTheme}" />
+ <tc:out label="Theme:" value="#{themeController.localizedTheme}" />
<tc:out label="Locale:" value="#{clientConfigController.localizedLocale}"/>
<tc:out label="Project Stage:" value="#{facesContext.application.projectStage}"/>
<tc:out label="CSP mode:" value="#{tobagoContext.tobagoConfig.contentSecurityPolicy.mode}"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
index d39de73..a0c4b3f 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
@@ -45,9 +45,9 @@
<tc:link id="config" label="#{demoBundle.menu_config}" omit="true">
<tc:link label="#{demoBundle.menu_themes}" omit="true">
- <tc:selectOneRadio value="#{clientConfigController.theme}">
- <tc:event action="#{clientConfigController.submit}"/>
- <tc:selectItems value="#{clientConfigController.themeItems}"/>
+ <tc:selectOneRadio value="#{themeController.theme}">
+ <tc:event action="#{themeController.submit}"/>
+ <tc:selectItems value="#{themeController.themeItems}"/>
</tc:selectOneRadio>
</tc:link>
<!--<tc:link action="#{clientConfigController.resetTheme}" label="Reset Theme"/>-->
--
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.