Introducing the Panel component
Panel is a generic component that can be used to hold other JSF components. Panel component supports features such as, header, footer, toggling, closing, custom actions, and pop-up menus. Also, Panel component provides support for AJAX event listeners for toggle and close events.
Let us see how to create a basic panel component:
<p:panel header="About PrimeFaces" footer="PrimeFaces Rocks!!!"> <p:outputLabel value="PrimeFaces is an open source JSF component suite with 100+ Components."/> </p:panel>
The preceding Panel component will be rendered as follows:
Panel component provides the following attributes to customize its appearance and behavior:
header
: Header text.footer
: Footer text.toggleable
: Makes panel toggleable. Default is false.toggleSpeed
: Speed of toggling in milliseconds. Default is 1000.collapsed
: Renders a toggleable panel as collapsed. Default is false.closable
: Make panel closable. Default is false...