arya-blue
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga-blue
vela-blue
MasterDetail
Straightforward navigation level by level by using of SelectDetailLevel handler. Context values (any objects) are passed from level to level and available via context variables. Level to go to can be set via "level" or "step" attribute (default is step=1 if nothing specified). Text for breadcrumb items is set by "levelLabel" attribute or "label" facet of MasterDetailLevel component.

Attention: You have to reference the pe:masterDetail in the "update" attribute of command components manually if you have any auto updatable components, such as p:growl or p:message with p:autoUpdate, on the page.
SportNumber of countries with leagues
Football4
Basketball3
Ice Hockey2
Source

<pe:masterDetail id="masterDetail" level="#{simpleMasterDetailController.currentLevel}">

    <pe:masterDetailLevel level="1" levelLabel="Sports">
        <p:dataTable id="sports" value="#{simpleMasterDetailController.sports}" var="sport">
            <p:column headerText="Sport">
                <p:commandLink value="#{sport.name}">
                    <pe:selectDetailLevel contextValue="#{sport}"/>
                </p:commandLink>
            </p:column>
            <p:column headerText="Number of countries with leagues">
                <h:outputText value="#{fn:length(sport.countriesWithLeague)}"/>
            </p:column>
        </p:dataTable>
    </pe:masterDetailLevel>

    <pe:masterDetailLevel level="2" contextVar="sport" levelLabel="Countries having #{sport.name} leagues">
        <p:dataTable id="countries" value="#{sport.countriesWithLeague}" var="country">
            <p:column headerText="Country">
                <p:commandLink value="#{country.name}">
                    <pe:selectDetailLevel contextValue="#{country}"/>
                </p:commandLink>
            </p:column>
            <p:column headerText="Code">
                <h:outputText value="#{country.code}"/>
            </p:column>
        </p:dataTable>
    </pe:masterDetailLevel>

    <pe:masterDetailLevel level="3" contextVar="country" levelLabel="#{country.sport} leagues of #{country.name}">
        <p:dataTable id="leauges" value="#{country.leagues}" var="league">
            <p:column headerText="League">
                <h:outputText value="#{league.name}"/>
            </p:column>
            <p:column headerText="Number of teams">
                <h:outputText value="#{league.numberOfTeam}"/>
            </p:column>
        </p:dataTable>
        <h:panelGrid columns="2" style="margin-top: 10px">
            <p:commandButton value="Go to Sports" icon="pi pi-fast-backward">
                <pe:selectDetailLevel level="1"/>
            </p:commandButton>
            <p:commandButton value="Go to Countries" icon="pi pi-step-backward">
                <pe:selectDetailLevel step="-1"/>
            </p:commandButton>
        </h:panelGrid>
    </pe:masterDetailLevel>

</pe:masterDetail>
            
Components and more
Documentation
Attributes (move mouse over the names to see data types)
Name Description
bindingAn EL expression referring to a server side UIComponent instance in a backing bean.Default is generated.
breadcrumbAboveHeaderWhether to render breadcrumb above the header.Default is true.
contextValueContext value for the current level.
idUnique identifier of the component in a namingContainer.Default is generated.
levelCurrent detail level (1-based).Default is 1.
renderedBoolean value to specify the rendering of the component, when set to false component will not be rendered.Default is true.
selectLevelListenerMethod expression invoked when navigating to a detail level.
showAllBreadcrumbItemsWhether to show all breadcrumb items.Default is false.
showBreadcrumbWhether to show the breadcrumb.Default is true.
showBreadcrumbFirstLevelWhether to show breadcrumb on first level.Default is true.
styleInline style of the component.
styleClassStyle class of the component.
PrimeFaces Extensions Showcase - © 2011-2025,PrimeFaces: 16.0.0-SNAPSHOT,PrimeFaces Extensions: 16.0.0-SNAPSHOT,JSF: Apache MyFaces Core 4.0 - Impl 4.0.3,Server: Apache Tomcat (TomEE)/10.1.52 (10.1.4),Build time: 2026-03-08 21:04