Each user needs to change theme in session
Posted: 22 Jun 2023, 21:02
Hello Guys!
I'm using primefaces 12 and springboot 2.7
I made a bean (guestPreferences) to controller de themes to each user using scope session.
It's working when i set in menu theme config:
but i'm setting primefaces.THEME parameter in onStartup's springboot. So i update page and the theme of primefaces.THEME setted returns.
I searched and the context-param in web.xml don't works because springboot don't reads web.xml
In onStartup the context is initialized and after don't can change the prameter.
Exists some primefaces configuration to set theme after context in initialized?
Thanks!
I'm using primefaces 12 and springboot 2.7
I made a bean (guestPreferences) to controller de themes to each user using scope session.
It's working when i set in menu theme config:
but i'm setting primefaces.THEME parameter in onStartup's springboot. So i update page and the theme of primefaces.THEME setted returns.
I searched and the context-param in web.xml don't works because springboot don't reads web.xml
Code: Select all
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>#{guestPreferences.theme}</param-value>
</context-param>
Exists some primefaces configuration to set theme after context in initialized?
Thanks!