<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" ... <h:head id="head"> ... </h:head> <h:body id="body"> ... <h:outputStylesheet name="prime-buttons.css" library="css"/> <h:outputScript name="prime-buttons.js" library="ext-js"/> </h:body> </html>
Danach erscheinen alle <h:commandButton> und andere Buttons im Primefaces Style.
<dependency> <groupId>org.primefaces.themes</groupId> <artifactId>sunny</artifactId> <version>1.0.8</version> </dependency>
Und dann nur noch in der web.xml auswählen:
<context-param> <param-name>primefaces.THEME</param-name> <param-value>sunny</param-value> </context-param>
<h:outputStylesheet name="jquery-ui-1.9.1.custom.css" library="skins/<theme>"/>