JBoss.orgCommunity Documentation
This chapter details those components in the a4j
tag library which define an area used as a container or wrapper for other components.
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.
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.
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.
The <a4j:region>
component specifies a part of the JSF component tree to be processed on the server. The region causes all the a4j
and rich
Ajax controls to execute: decoding, validating, and updating the model. The region causes these components to execute even if not explicitly declared. As such, processing areas can more easily be marked using a declarative approach.
Regions can be nested, in which case only the parent region of the component initiating the request will be processed.