DataTable - Sticky Header

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

IdYearBrandColor
2787ec551975VolvoBlue
2a155d8c1975BMWOrange
238a718b1970VolvoMaroon
a703755b2004FiatBlue
61a8e5d21994FiatMaroon
749274612006AudiBlack
74c0ab462001VolkswagenBlue
edd410ea1997JaguarBlue
8b0856ff1965HondaBlack
c3991ce92001VolvoBrown
25731a841985HondaYellow
713ed1ff2006MercedesBrown
9eabe7691960BMWYellow
d68b834f1967VolvoOrange
e9a371791994MercedesOrange
cfcfd2402007MercedesYellow
af0078df1991JaguarBrown
2b03e7cd2001MercedesBlack
7e26e3d41994RenaultOrange
f7841f7b1984RenaultGreen
ef90ee6a1979FiatSilver
7c6eb17e2007VolvoSilver
af2556201979FordWhite
2dc82aa31983VolkswagenRed
25613c191968HondaYellow
7cee44fe1973VolvoWhite
a7481c271972VolvoGreen
991dd6d31960RenaultWhite
821956f82006AudiWhite
e8a251341997MercedesRed
1a1fd1021976VolkswagenYellow
68f7029d1999RenaultBlack
48e949171967RenaultRed
b772e6f01987RenaultSilver
eea10b781993JaguarRed
2e24b1842006RenaultMaroon
0e81ff9e1983BMWBrown
bce8f38c1974RenaultYellow
92f9c64e1978MercedesSilver
1259cc242000HondaRed
02fa88091964MercedesBlue
408aee521986MercedesBlack
d53e55981996FiatBrown
ddec8aa41982RenaultBrown
5fe4f74a1985AudiBlue
dc19bd191980VolvoBlue
a5d71ddb2005VolvoMaroon
cf5d446d1963MercedesRed
b5ec79af2008BMWYellow
ab8cec162000BMWSilver
<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>