T
Yes, of course. First of all, you can change the whole subject, free-of-charge options. http://www.primefaces.org/showcase/ui/misc/themeSwitcher.xhtml ♪If there's a need to change a specific component, you'll be assisted by a browser pal and knowledge. CSS♪ In the palace, we pick the right component and watch it. HTML and style. For p:accordionPanel root current is divby name ui-accordion♪ We add to the page our styles that alter the Primefaces styles, this is an example of the alteration of the component type and the colour of the panel with the contents of the component: <h:form id="mainForm">
<p:accordionPanel>
<p:tab title="Godfather Part I">
<h:panelGrid columns="2" cellpadding="10">
<h:outputText value="The story begins as Don Vito Corleone..."/>
</h:panelGrid>
</p:tab>
<p:tab title="Godfather Part II">
<h:panelGrid columns="2" cellpadding="10">
<h:outputText value="Francis Ford Coppola's legendary..."/>
</h:panelGrid>
</p:tab>
</p:accordionPanel>
</h:form>
<style type="text/css">
#mainForm .ui-accordion {
font-family: "Courier New", Courier, monospace;
}
#mainForm .ui-accordion-content {
background-color: aliceblue;
}
</style>
#mainForm .ui-accordion - it is a path to inform the browser that all elements with style .ui-accordion and inside the identifier mainForm, now get the style. This is a way to avoid touching the others. p:accordionPanel- You're on the page. If you want a change of style to affect everything p:accordionPanel-You're in the annex, #mainForm You should remove, take the style into a separate CSS file and import it on your page (most likely to do so in a template that should use all pages of the site).By adopting this approach, any components of PrimeFaces can be changed. If something doesn't work out, it'll probably be CSS, not PrimeFaces.