Mirage LIVE PREVIEW

DataTable - Paginator

DataTable provides a highly customizable ajax paginator.

Documentation
IdYearBrandColor
1a002a081971JaguarBlue
62fe978e1992MercedesWhite
d95dd1f91963RenaultBlack
13c2f7751988HondaBlue
c11b98382000BMWYellow
b9905c041962VolvoSilver
4c5e882f1965VolkswagenRed
6178e7391968BMWGreen
4bf704c41979HondaMaroon
5ca24b651992FordWhite
<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>