DataTable - Paginator

DataTable provides a highly customizable ajax paginator.

IdYearBrandColor
174782c91964BMWGreen
ee0ae2101983VolkswagenGreen
c71383761975FiatSilver
638d5c461984BMWBlack
0e5cbe9e1972FiatBlue
714ffb4a2002VolvoMaroon
da3f42ac1978RenaultBlue
ae5bc0161966FiatSilver
34ee2ace1973BMWGreen
5d06448f1990JaguarOrange
<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>