How to keep the theme for all pages from themeSwitcher

UI Components for JSF
Post Reply
non-serviam
Posts: 2
Joined: 14 Sep 2014, 04:21

14 Sep 2014, 04:30

I have put a themeSwitcher on one of my pages and even though that the theme changes when I use it, when I go to another page the theme changes back to the default one.
I have tried to put

Code: Select all

<context-param>
      <param-name>primefaces.THEME</param-name>
      <param-value>#{sessionBean.theme}</param-value>
</context-param>
so that it can save it on a session scoped bean, but on the start I am getting

Code: Select all

org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke public void beans.AuthorizationBean.init() on beans.SessionBean@2fdc10e1
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.NullPointerException
What can I do to keep the selected theme?

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

14 Sep 2014, 15:15

see my response in this forum topic
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests