DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
2a8194e71999MercedesOrange
960f41101992FiatBlack
8bd9da091989FordMaroon
327a2cb01983AudiSilver
3b650a771960FordWhite
aadf10131977AudiGreen
a008280f2009JaguarBlack
24fd8afd1984JaguarYellow
45d01f881990BMWBlue
6c457da81986VolvoYellow
<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>