DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
cf30fa042009FiatOrange
185d07991980FordYellow
850ff89c1982JaguarOrange
b43349c31993JaguarYellow
3c3ded141995JaguarBrown
657b758a1994FordSilver
4f5628b41962MercedesBrown
47e616f91965FordBlack
f8a649531992HondaBrown
482ae03d1969VolvoYellow
<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>