DataTable - Sticky Header

Header of the datatable can be fixed to keep it in viewport during scroll.

IdYearBrandColor
134d93ac1996FiatOrange
b183a5a51979RenaultBlue
4c0269151986HondaOrange
da621e7c2001VolkswagenGreen
48c165241980FiatYellow
fbc07ee61992FordOrange
9c7f88bd1974BMWMaroon
b12241c41966RenaultRed
74f4f5a31965FordOrange
0c83292a1970AudiYellow
3367cf812002VolvoBlack
2929c0661973MercedesRed
4689a3c91986FiatRed
6c47c75b1972RenaultBlack
e8c7229b1997MercedesRed
f4712b7c1994JaguarBrown
e6a3c1cb1969VolkswagenOrange
ae69062b2003VolvoWhite
4853201f1973JaguarSilver
91ba24b41982HondaMaroon
a6ebe19e1996VolvoBlue
f0a4f87b1998HondaBlue
11af662b1989VolvoWhite
4a284f261981VolkswagenSilver
f6251d581975VolvoMaroon
8c7f37bc2000MercedesBlue
8063313c1975AudiBlack
0a7bf7161990FordYellow
335064ec1980FiatBrown
548bb0df1987FordSilver
8ad919361988HondaSilver
af9c7b5b1986VolvoSilver
77b4448f1962JaguarOrange
2bdf47331985AudiWhite
43d5a8d42009FordGreen
066c6ec71994HondaBrown
f04e360b1962RenaultOrange
7cc40a471970VolvoBlack
a583b3642004MercedesRed
bdb45b661960VolvoRed
8fd4bcac1980FiatMaroon
c7590fa52002MercedesMaroon
e8b95a7f2009RenaultYellow
1f1627c21991JaguarBrown
dad69e521983HondaBrown
4fbb7bcc1976AudiYellow
5067dae81983RenaultBlue
aa477fc91970FordBrown
a02aebc21981HondaBrown
f61865371981BMWGreen
<p:dataTable var="car" value="#{dtStickyView.cars}" stickyHeader="true">
    <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>