DataTable - Paginator

DataTable provides a highly customizable ajax paginator.

IdYearBrandColor
b5c7b4811962FordGreen
11b21a861987RenaultRed
67c000ef1966RenaultGreen
a11e67ac2004HondaGreen
0eede4d22004AudiBlue
023767811964RenaultBrown
c3d17ac31960JaguarBlack
429cd9101970FordBrown
f43ee5b91998AudiRed
c47b8e0c1976BMWBlue
<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>