DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
a9180e041961RenaultBrown
968b11d51994HondaSilver
2c4d1b462004VolkswagenSilver
2b0dec2e1974HondaSilver
fb1969ef1998RenaultSilver
e835421f1992JaguarBlue
8aaed93d1988FordBlack
617bde1c1982VolkswagenGreen
843d06682008MercedesBlack
ad1b9a752003FiatBlue
<p:dataTable var="car" value="#{dtBasicView.cars}">
    <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>
</p:dataTable>