RichFaces and PrimeFaces Integration
April 8, 2009 5 Comments
It is usually pain to merge two or more component suites in one project. If you’ve ran into some issues then you know what I’m talking about. One of the design goals of PrimeFaces is the compatibility with other JSF component libraries.
For example, RichFaces and PrimeFaces can work together well. Even the ajax integration would work. Both libraries has partial page rendering features, the cool thing is that no known conflict occurs even when using ajax stuff together.
Following a4j:commandButton reRender’s primefaces panel;
<a4j:commandButton value="Rich Update" reRender="primePanel" /> <p:panel id="primePanel" header="Visca el Barca"> <h:outputText value="I hope Barca will kick Bayern's ass" /> </p:panel>
And the vice versa, primefaces button reRender’s rich:panel.
<p:button value="Prime Ajax Update" update="richPanel" async="true"/> <rich:panel id="richPanel" header="Visca el Barca"> <h:outputText value="I hope Barca will kick Bayern's ass" /> </rich:panel>
JSF 2.0 standardizes many things like ajax and resource loading but it’s still component library’s responsibility to follow the standard. Even before JSF 2.0, as of JSF 1.2 PrimeFaces is friendly to other component libraries, the idea is not to mess with JSF extension points a lot and use them as minimal as possible. That’s why PrimeFaces has no filter:)