DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
28129c161973HondaGreen
859941c81993MercedesBrown
462c728b1960JaguarWhite
4ebbdefb1960AudiGreen
8f42f7682005MercedesBlack
128f8af81970VolkswagenBlack
a39d26ac1962MercedesYellow
ecf427401986MercedesMaroon
8a474dc02009VolkswagenBlack
03dbe5891999FordSilver
<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>