DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
b800e5741980VolkswagenGreen
381116d01993RenaultBlack
2603fbc31980RenaultMaroon
bf724eca1969AudiRed
9ac98a8d1987VolvoOrange
d54ae5731974RenaultBrown
bf6adffb1971RenaultWhite
631a4a801996JaguarMaroon
aac744571978AudiOrange
0e36e7a61993VolkswagenBrown
<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>