DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
ab83abd61963HondaRed
636bdab21978HondaWhite
a502af591962FordOrange
64c763481964VolvoBlack
b121b2151982VolvoWhite
753284f12009AudiWhite
5e1465991965AudiSilver
0454fda31991MercedesOrange
07cdec4a1986VolkswagenBrown
b27881472009VolvoGreen
<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>