DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
0b6357bb1975FordYellow
ee1b9be71993MercedesBlack
640b587e1993AudiSilver
eac425e11985HondaWhite
857869d91962VolkswagenGreen
0ddcf4ef1989BMWGreen
94e69bcb1971AudiBlack
ac77bcf72008AudiBlack
cf9457971994FordSilver
d9efbb3a2001HondaBrown
<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>