DataTable - Basic

DataTable displays data in tabular format.

IdYearBrandColor
d5a9b04e2002BMWGreen
4178711f1960JaguarMaroon
d93f138d1997VolvoMaroon
b8cfa7521983AudiBlue
b76beb981961AudiBlack
3f5712ca1966VolkswagenBrown
c4d1947f1978VolkswagenSilver
0785f7db2007FordWhite
cc06ef412007VolkswagenBlue
093e63251991VolkswagenWhite
<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>