DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
b19efc0f1991VolkswagenSilver
6deb19621967AudiWhite
f5c3eeec2001HondaOrange
652404dd1977VolkswagenGreen
b2e99cd41967FiatYellow
c9c11ba01982JaguarBlack
6a86a58d1963AudiWhite
679b78311982JaguarWhite
d2a8ae0f2005VolvoYellow
4cfa4ec51972JaguarBrown
<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>