<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>
Oder man bindet das Theme im Page-Template ein:
<h:outputStylesheet name="theme.css" library="primefaces-<theme>"/>
für die Skins verwendet werden. Aus dem heruntergeladenen ZIP wird das Verzeichnis custom-theme nach <web-root>/resources/primefaces-<theme>/ extrahiert, sodass sich darin /images und /jquery-ui-1.9.1.custom.css befindet. /jquery-ui-1.9.1.custom.css wird nach theme.css umbenannt, damit Primefaces es findet. Oder eben wieder über die Anweisung <h:outputStylesheet>.
<p:menuitem> <h:commandLink styleClass="ui-menuitem-link ui-corner-all"> <f:ajax/> <h:outputText value="Scopes"/> <e:load scopeId=":scopeList"/> </h:commandLink> </p:menuitem>
Erklärung: Es wird ein <h:commandLink> innerhalb des <p:menuitem> platziert, der den Primefaces-Style enthält. Dieser unterstützt nun Behaviors und ActionEvents und sieht genauso aus.
.ui-datatable table {
table-layout: fixed !important;
}
.ui-datatable .ui-column-filter {
width: 80px;
}
.ui-datatable tbody td, .ui-treetable tbody td {
padding: 3px 4px;
}
.ui-datatable thead th, .ui-treetable thead th {
padding: 3px 4px;
}
.ui-datatable tfoot td, .ui-treetable tfoot td {
padding: 3px 4px;
}