Reputation: 1160
We need to use multiple primefaces JSF themes in a single web application, we have several modules in the application each having their own few screens, and we want each module to have different primefaces theme,
can anyone please let us know how that can be achieved.
in web.xml we have specified :
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>start</param-value>
</context-param>
thanks
Upvotes: 3
Views: 2028
Reputation: 258
Setting the primefaces theme in the Web.xml file will effect the whole application, but there is a workaround for this as the following:
thats it :)
Upvotes: 1
Reputation: 71
Per page you can get it. in web.xml, you can write:
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>#{sessionBean.userTheme}</param-value>
</context-param>
and set userTheme in backing bean each time page changed.
Otherwise, you may extend primefaces components. Then specify specific themes per component.
Upvotes: 5