At least in PrimeFaces 2.2, the correct parameter in web.xml is primefaces.SKIN :
<context-param> <param-name>primefaces.SKIN</param-name> <param-value>none</param-value> </context-param>
Change from @ Cagatay comment : "primefaces.THEME is the official parameter name, others are outdated and will be removed in version 3.0."
This allows me to dynamically specify the skin using bean:
@Named @SessionScoped public class LayoutBean { ... private String theme = "aristo"; ... public String getTheme() { return theme; } ... }
Then in the markup:
<link rel="stylesheet" href="#{request.contextPath}/themes/#{layoutBean.theme}/skin.css" />
Matt ball
source share