DataTable

Basic usage is same as standard datatable.

ModelYearManufacturerColor
0c104a591973FerrariRed
3a2eb7492009RenaultMaroon
3ee485802003ChryslerBlack
03154bdd1978FerrariOrange
27b794df2009MercedesYellow
2a054a131995RenaultWhite
5dd7344c1991ChryslerWhite
c504f2022006ChryslerBlue
6c3835041988VolvoYellow

Source

<h:form>
    <p:dataTable var="car" value="#{tableBean.carsSmall}">
        <p:column headerText="Model">
            <h:outputText value="#{car.model}" />
        </p:column>

        <p:column headerText="Year">
            <h:outputText value="#{car.year}" />
        </p:column>

        <p:column headerText="Manufacturer">
            <h:outputText value="#{car.manufacturer}" />
        </p:column>

        <p:column headerText="Color">
            <h:outputText value="#{car.color}" />
        </p:column>
    </p:dataTable>
</h:form>