Grouping content with a standard panel
panel
is a generic grouping component for JSF components, with features such as toggling, closing, a built-in pop-up menu, and AJAX event listeners.
How to do it...
A basic definition for the panel would be as follows:
<p:panel id="simple" header="PrimeFaces" footer="The Cookbook"> <h:outputText value="Open Source Primefaces is the leading JSF Component Suite in the industry, which is adopted widely and being used in production ready projects around the globe." /> </p:panel>
The preceding panel definition will be rendered as shown in the following screenshot:
How it works...
The header
and footer
attributes can be used to render text at the top of the panel as a header and at the bottom of the panel as a footer. In order to make the panel closeable and toggleable, the closeable
and toggleable
attributes should be set to true
. Once the panel gets closed, the page should be refreshed or the panel should be rerendered again to see the panel...