The rich:accordion component is a set of panels where one panel is expanded, while the other ones are collapsed. This is similar to, and inherits much of the features from the rich:togglePanel, and rich:tabPanel. See the descriptions of these components for details on switch-types, and shortcuts.
The following example shows the usage of the rich:accordion in client mode:
We are working hard on RichFaces 4.0 which will have full JSF 2 integration. That is not all though, here is a summary of updates and features:
<!DOCTYPE html> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:outputStylesheet> .rf-ac { width: 500px; } .rf-ac-itm-c { height: 220px; } </h:outputStylesheet> <h:form id="form"> <rich:accordion switchType="client"> <rich:accordionItem header="Overview:"> <h:graphicImage value="/images/icons/common/rf.png" style="float:right" alt="rf" /> RichFaces is a component library for JSF and an advanced framework for easily integrating AJAX capabilities into business applications. <ul> <li>100+ AJAX enabled components in two libraries</li> <li>a4j: page centric AJAX controls</li> <li>rich: self contained, ready to use components</li> <li>Whole set of JSF benefits while working with AJAX</li> <li>Skinnability mechanism</li> <li>Component Development Kit (CDK)</li> <li>Dynamic resources handling</li> <li>Testing facilities for components, actions, listeners, and pages</li> <li>Broad cross-browser support</li> <li>Large and active community</li> </ul> </rich:accordionItem> <rich:accordionItem header="JSF 2 and RichFaces 4:"> <p>We are working hard on RichFaces 4.0 which will have full JSF 2 integration. That is not all though, here is a summary of updates and features:</p> <ul> <li>Redesigned modular repository and build system.</li> <li>Simplified Component Development Kit with annotations, faces-config extensions, advanced templates support and more..</li> <li>Ajax framework improvements extending the JSF 2 specification.</li> <li>Component review for consistency, usability, and redesign following semantic HTML principles where possible.</li> <li>Both server-side and client-side performance optimization.</li> <li>Strict code clean-up and review.</li> </ul> </rich:accordionItem> </rich:accordion> </h:form> </ui:composition>