DataTable - Paginator

DataTable provides a highly customizable ajax paginator.

IdYearBrandColor
402749761998MercedesGreen
f785031d1999VolvoRed
dc44b74c1960VolvoBlue
70a4c4531993MercedesMaroon
57b9d09d1988FiatWhite
ed2eaaa71988RenaultWhite
787d7b691960MercedesYellow
4d2d3c391983VolvoBlack
b10f544b1986RenaultMaroon
fcd9ed191993VolkswagenBrown
<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>