Ajax Action
a4j:ajax
a4j:commandButton
a4j:commandLink
a4j:actionListener
a4j:jsFunction
a4j:poll
a4j:push
a4j:param
Ajax Queue
a4j:queue
a4j:attachQueue
Ajax Output/Containers
a4j:outputPanel
a4j:status
a4j:region
a4j:mediaOutput
a4j:log
Validation
Client Side Validation
rich:graphValidator
rich:message
rich:messages
rich:notify
Data Iteration
a4j:repeat
rich:dataTable
rich:extendedDataTable
rich:collapsibleSubTable
rich:dataScroller
rich:list
rich:dataGrid
Trees
rich:tree
Tree Adaptors
Output/Panels
rich:chart
rich:panel
rich:togglePanel
rich:tabPanel
rich:collapsiblePanel
rich:accordion
rich:popupPanel
rich:progressBar
rich:tooltip
Menus
rich:panelMenu
rich:toolbar
rich:contextMenu
rich:dropDownMenu
Inputs
rich:autocomplete
rich:calendar
rich:editor
rich:inputNumberSlider
rich:inputNumberSpinner
rich:inplaceInput
rich:fileUpload
Selects
rich:inplaceSelect
rich:select
rich:orderingList
rich:pickList
Drag and Drop
Drag and Drop
Miscellaneous
Standard elements skinning
rich:placeholder
RichFaces functions
rich:focus
rich:componentControl
rich:hashParam
rich:hotKey
rich:jQuery

The rich:togglePanel is a core component for all switchable panels in RichFaces. It renders a sequence of panels based on state that can be switched (toggled) by a behavior called rich:toggleControl. All of these other panels (e.g. tabPanel, accordion, etc...) share the basic sets a features defined below.

The switchType attribute defines the strategy used to toggle between panels. The possible values for this attributes are:

  • client - switching happens on the client without any request to the server. A jsf form is not required in this mode
  • ajax - when states are switched, the content of new states comes from the server via Ajax requests.
  • server - the whole page is reloaded when states are switched

There is also a very useful set of shortcut toggle values that allow you to create many custom effects like wizards. See the other switchable panel examples. Available shortcuts are defined below:

  • @next
  • @prev
  • @first
  • @last

A rich:togglePanel has no default appearance, and allows you to customize it's look-n-feel any way you like. You create a set of child rich:togglePanelItem's with any content you want inside of them.

As the component does not provide any predefined layout it could be used for creation of any kind of switchable panels. This example is a very simple tabbed pane organized using that component:

This toggle panel switches in Ajax mode. So only one active item loaded to the client.

For now you are at Panel 1

Toggle Panel Item 1
Toggle Panel Item 2