I am trying to get the downloaded Dark-Hive Themeroller theme for a PrimeFaces project going but can't figure out why it won't show...Looking into the html source code I always see Aristo theme, which I believe is the default PrimeFaces theme. I followed multiple forum suggestions but have to post this one into the community - maybe someone can give me a hint.
I don't output any CSS simply because according to the docs it's not needed for PF themes to work.
<context-param>
<param-name>javax.faces.WEBAPP_RESOURCES_DIRECTORY</param-name>
<param-value>/WEB-INF/resources</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>dark-hive</param-value>
</context-param>
Please note that I moved the resources folder into WEB-INF/.
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>dark-hive</artifactId>
<version>1.0.8</version>
</dependency>
Because of Maven dependency and manual download/drop into /WEB-INF/lib folder I now have 2 dark-hive.jar in my war file:
Both have the same internal structure.
I am using WildFly 8.1.0.Final with upgraded JSF Mojarra 2.2.8, PrimeFaces 5.1, OmniFaces 1.8.1
Any ideas?
The answer lies within the use of OmniFaces showcase HeadRenderer.
In my faces-config.xml I was using:
<render-kit>
<renderer>
<component-family>javax.faces.Output</component-family>
<renderer-type>javax.faces.Head</renderer-type>
<renderer-class>org.omnifaces.showcase.HeadRenderer</renderer-class>
</renderer>
</render-kit>
which used the primefaces-aristo theme. Solution was to write my own HeadRenderer according to: