DataTable - Paginator

DataTable provides a highly customizable ajax paginator.

IdYearBrandColor
30a859252003MercedesBrown
29c506052004MercedesBrown
37b0be501970VolkswagenSilver
b5fe43581979RenaultGreen
3b1555651975RenaultBrown
6c36836e1980BMWYellow
e7b5789d1983MercedesYellow
a9d357681970FordWhite
baf1ccaa1970JaguarSilver
0c4e360f1982FiatBrown
<h:form>
    <p:dataTable var="car" value="#{dtPaginatorView.cars}" rows="10" 
                 paginator="true"
                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                 rowsPerPageTemplate="5,10,15">
        <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="paginatorTopLeft">
            <p:commandButton type="button" icon="pi pi-refresh" />
        </f:facet>

        <f:facet name="paginatorBottomRight">
            <p:commandButton type="button" icon="pi pi-cloud-upload" />
        </f:facet>

    </p:dataTable>
</h:form>