Chapter 7. Containers

This chapter details those components in the a4j tag library which define an area used as a container or wrapper for other components.

7.1. <a4j:outputPanel>

The <a4j:outputPanel> component is used to group together components in to update them as a whole, rather than having to specify the components individually.

7.1.1. Aiding complex Ajax rendering

Use the <a4j:outputPanel> component to wrap behaviors when using complex Ajax rendering. Parent components may not render correctly when attached behaviors trigger updates. Point the behaviors to the wrapping <a4j:outputPanel> component instead of the parent components. The <a4j:outputPanel> component is properly encoded to ensure the wrapped components are correctly rendered.

7.1.2. Panel appearance

The layout attribute can be used to determine how the component is rendered in HTML:
  • layout="inline" is the default behavior, which will render the component as a pair of <span> tags containing the child components.
  • layout="block" will render the component as a pair of <div> tags containing the child components, which will use any defined <div> element styles.
Setting ajaxRendered="true" will cause the <a4j:outputPanel> to be updated with each Ajax response for the page, even when not listed explicitly by the requesting component. This can in turn be overridden by specific attributes on any requesting components.

7.1.3. Reference data

  • component-type: org.richfaces.OutputPanel
  • component-class: org.richfaces.component.UIOutputPanel
  • component-family: javax.faces.Panel
  • renderer-type: org.richfaces.OutputPanelRenderer