Can I change PrimeFaces theme on the fly?

I have a multi-user system, a user subscribes with a custom theme in an application, I want to know if the theme can be changed on the fly after the user has subscribed. I'm new to Primefaces, thanks for your help!

+3


source to share


1 answer


The primary interfaces already implement the jQuery UI ThemeRoller . In your web.xml, you can define the context-param primefaces.THEME

with a parm value indicating the scope support with a session-bound bean.

<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>#{FooBar.theme}</param-value>
</context-param>

      



See also: http://www.primefaces.org/primeui/themes.html

+2


source







All Articles