DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
8dc3095d1961VolkswagenGreen
fe96251b1992RenaultBlue
d47898ad2005FiatBlack
d03197091984VolkswagenOrange
f8e924312005MercedesOrange
1d48339e2009MercedesYellow
51401a4b1976AudiYellow
cdb518291974JaguarMaroon
2f82baf21968JaguarBlack
1c2608341978BMWBlue
<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>