DataTable - Header and Footer

Header and Footer section are defined using facets.

Documentation
List of Cars
IdYearBrandColor
740e07bd1993AudiBlack
c92405f22006HondaWhite
fe8534492005VolvoWhite
7ce645691990JaguarOrange
3ae5b4e31995VolvoGreen
da885ce42003FiatBrown
8e157ff71975VolkswagenBlack
1f0b18742006FiatBlue
7f2e0b542009MercedesYellow
920afe422006BMWRed
<p:dataTable var="car" value="#{dtBasicView.cars}">
    <f:facet name="header">
        List of Cars
    </f:facet>
    
    <p:column headerText="Id">
        <h:outputText value="#{car.id}" />
    </p:column>

    <p:column headerText="Year">
        <h:outputText value="#{car.year}" />
    </p:column>

    <p:column headerText="Brand">
        <h:outputText value="#{car.brand}" />
    </p:column>

    <p:column headerText="Color">
        <h:outputText value="#{car.color}" />
    </p:column>
    
    <f:facet name="footer">
        In total there are #{fn:length(dtBasicView.cars)} cars.
    </f:facet>
</p:dataTable>

FREE THEMES

Built-in component themes created by the PrimeFaces Theme Designer.

nova-light Nova-Light
nova-dark Nova-Dark
nova-colored Nova-Colored
luna-blue Luna-Blue
luna-amber Luna-Amber
luna-green Luna-Green
luna-pink Luna-Pink
omega Omega

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.