DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
f574f9ec2006VolvoOrange
d96d81961973FordRed
0c87837c1977FiatWhite
54724bd41966VolkswagenMaroon
f0aa8ec31960JaguarWhite
29d1f9c71989FiatRed
18d277231984RenaultBlue
e954437d1985VolkswagenGreen
ae56f8861982HondaRed
e801c5ae1975VolkswagenMaroon
<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>