Theme
Layout
Element layout is defined via "fullPage" attribute. Setting "fullPage" to false causes an element layout. An example below shows two element layouts with server-side state management. Try to resize, open or close panes and switch between layouts.

The entire layout is described by options (class LayoutOptions) which are bound to the "options" attribute of pe:layout. They are created like a Tree with parent-child relation. LayoutOptions is optional, it also possible to create a layout by options defined as attributes of pe:layoutPane. Note: LayoutOptions created as Java model takes precedence over layout options as tag attributes. It is up to you if you would like to use all available options via LayoutOptions or a limited set of options in pe:layoutPane.
Left
Center
Source

<h:panelGroup id="layoutsContainer">
    <p:commandButton value="Switch between element layouts" actionListener="#{elementLayoutController.toogleLayout}"
                     process="layoutsContainer" update="layoutsContainer" icon="ui-icon-newwin"/>

    <h:panelGrid id="layoutsGrid" columns="2" style="margin-top: 15px;" cellpadding="0" cellspacing="0">
        <pe:layout fullPage="false" style="width:450px; height:220px;"
                   options="#{elementLayoutController.layoutOptionsOne}"
                   rendered="#{elementLayoutController.layoutOneShown}"
                   state="#{elementLayoutController.stateOne}">
            <pe:layoutPane position="west">
                Left
            </pe:layoutPane>
            <pe:layoutPane position="center">
                Center
            </pe:layoutPane>
        </pe:layout>

        <pe:layout fullPage="false" style="width:450px; height:220px;"
                   options="#{elementLayoutController.layoutOptionsTwo}"
                   rendered="#{!elementLayoutController.layoutOneShown}"
                   state="#{elementLayoutController.stateTwo}">
            <pe:layoutPane position="east">
                <pe:layoutPane position="center">
                    <f:facet name="header">
                        Header East-Center
                    </f:facet>
                    East-Center
                </pe:layoutPane>
                <pe:layoutPane position="south">
                    <f:facet name="header">
                        Header East-South
                    </f:facet>
                    East-South
                </pe:layoutPane>
            </pe:layoutPane>
            <pe:layoutPane position="center">
                Center
            </pe:layoutPane>
        </pe:layout>
    </h:panelGrid>
</h:panelGroup>
            
Components and more
Documentation
Attributes (move mouse over the names to see data types)
Name Description
id Unique identifier of the component in a namingContainer.
rendered Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar Name of the client side widget.
fullPage Specifies whether layout should span all page or not. Default value is true.
options Layout options as an instance of the class LayoutOptions or an JSON String representing serialized LayoutOptions. LayoutOptions created as Java model takes precedence over layout options as tag attributes. Serializing of layout options to an JSON string can increase the time of layout building when the layout is built during application startup in an application scoped bean (LayoutOptions gets always serialized to JSON to be able to be used in the underlying widget). Use the method toJson() in the LayoutOptions if you want to serialize all options to an JSON string.
style Style of the main Layout container element. Default value is null.
styleClass Style class of the main Layout container element. Default value is null.
state Indicates server-side state management. A hash (JSON string) containing all dimensions and close, open state of existing layout panes. It can be bound to a bean.
stateCookie Indicates client-side state management. When set to true the current layout state will be stored in HTML5 LocalStorage on window unload and restored during layout build-up when user enters the same page. Default is false.
resizerTip Tip when resizer-bar can be dragged to resize a pane. Default is 'Resize'.
sliderTip Tip when the resizer-bar will trigger 'sliding open'. Default is 'Slide Open'.
togglerTipOpen Tip on toggler when pane is 'open'. Default is 'Close'.
togglerTipClosed Tip on toggler when pane is 'closed'. Default is 'Open'.
maskPanesEarly Useful flag if you are dealing with iframes or objects like applets inside layout panes. This option triggers masking each time the mouse moves over a resizer - instead of waiting until your 'grab it' with your mouse. This is done just in case you are about to grab & drag the resizer. Enabling this avoids the slight delay that sometimes occurs when you quickly grab a resizer and try to drag over an iframe or object. Default is false.
Events (move mouse over the names to see classes)
Name Description
openfires after a layout pane gets opened
closefires after a layout pane gets closed
resizefires after a layout pane gets resized
PrimeFaces Extensions Showcase - © 2011-2021,PrimeFaces: 10.0.0,PrimeFaces Extensions: 10.0.5,JSF: Apache MyFaces JSF-2.3 Core API 2.3.9,Server: jetty/9.4.36.v20210114,Build time: 2021-08-28 16:46
occured!