DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
68d9c1792007AudiGreen
10c9b7cd2003BMWWhite
b541b89e1977BMWGreen
a239750e1989HondaWhite
aaea868b1995VolvoBrown
159d082c2003FiatGreen
d5f7385a1967VolvoWhite
2f1e1f401974MercedesGreen
97b4bb201979VolvoSilver
31fc8b662003MercedesSilver
<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>