DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
e6dc03631995FiatGreen
f6770fb91964RenaultRed
c3de39042006VolvoGreen
3c245fd62009MercedesOrange
d2f91cd51996RenaultWhite
38c1776b1983RenaultWhite
160da2751999BMWBrown
ee5299661960FiatSilver
5a4de7232004AudiOrange
cd00fd8c1997VolkswagenSilver
<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>