DataTable - Sticky Header

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

IdYearBrandColor
b01272951968VolkswagenBrown
dc0480c91974BMWWhite
0dbebbef2005FordSilver
8739debc2008VolkswagenBlack
cc30e7921963AudiBlue
746ec3791994AudiYellow
c249589c1993FordWhite
ca6ce5b71998JaguarMaroon
eb08aa1f2008FiatSilver
3858d4241994HondaBlue
504478251965JaguarGreen
41b8fbe31996VolkswagenRed
914e95561983HondaBrown
d96263122001RenaultSilver
4f7c4e281960RenaultRed
79751eb81967AudiBrown
b7c19ae41992HondaOrange
b9baf56e1960MercedesBrown
7f22b8b51996FordBlack
03e076461980FiatBlack
ae25dcdb1978RenaultMaroon
d675c7bd1961VolvoBrown
54df22311968VolvoRed
15f1d8ec1971FordOrange
6a717b251979VolvoBlue
53fb6df31980FordOrange
33f56eab1986VolkswagenOrange
9043a85c1977RenaultRed
fddc59fb2002FiatGreen
1d4c80af1972JaguarOrange
935fcf481989FiatWhite
164224801976RenaultBlack
606d5d002004FordRed
ea35b89c1989MercedesRed
0a60d0291968JaguarBrown
fe5d8ede1982FordOrange
01a1f1721972FiatMaroon
d36909811973VolvoYellow
740238571987AudiYellow
3907a5ea1995RenaultBlack
d390caf81974FiatSilver
2957e98d2009FordOrange
dd15e6011974VolkswagenMaroon
5664ff701987JaguarGreen
b98655d72003FordWhite
b5c1f96a2004HondaBlack
d6397c621973VolkswagenBlack
0f5168b41974RenaultBlack
80a6d6c91966AudiMaroon
2d7cc7ec1993FiatSilver
<p:dataTable var="car" value="#{dtStickyView.cars}" stickyHeader="true" stickyTopAt=".layout-topbar">
    <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>