DataTable - Sticky Header

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

Documentation
IdYearBrandColor
abb5b2581988JaguarSilver
b02412671973BMWWhite
39f6e2b81975RenaultYellow
c0f0bfaf2005AudiBrown
1dc894252006RenaultMaroon
afb0b41c1986JaguarMaroon
2e0919bf1981FiatMaroon
3a1b8ab21983AudiYellow
b8a596dc1984FordMaroon
3618d3431989VolkswagenMaroon
fb64f8d82007VolkswagenOrange
80a0216c2007BMWBlack
ee3d17101976FiatMaroon
6325a2df1969AudiOrange
65f1f4811979JaguarMaroon
c508abd72003BMWBrown
14611f3b1973FordSilver
0643efe11990AudiBlack
1339ae931990VolvoRed
7dedf3f61993FordSilver
28adfc1b1977HondaGreen
edd4447c1973RenaultBlue
b946e70d2002VolvoBlue
a53a8e3b1999VolvoBrown
0a4717d91977VolkswagenBrown
e7c9c48a1982VolkswagenBrown
902e2e751969BMWYellow
7c5dbf0c2006FordRed
23692a4b1975MercedesWhite
376e7a311982BMWSilver
0ee5dc2b1975HondaBlue
938ee97f1996VolvoBlack
c6cab1d71978RenaultBlack
7cd77c472000JaguarWhite
60c10b021991MercedesYellow
bd9592721980AudiRed
3590ef8f1974RenaultWhite
f2d490ac2004MercedesMaroon
a9d742991976FordSilver
3ffff8a11999MercedesBrown
86f004251967AudiRed
d7f5f5e71976VolkswagenRed
925f66ec1996FordBrown
5c2c9e831977VolvoRed
816edb5f1964JaguarGreen
7d478a1a2000RenaultBlue
46db097b1964JaguarYellow
99b458d21976FiatWhite
d1b5f4601980JaguarWhite
b618e2341967BMWBlue
<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>

FREE THEMES

Built-in component themes created by the PrimeFaces Theme Designer.

nova-light Nova-Light
nova-dark Nova-Dark
nova-colored Nova-Colored
luna-blue Luna-Blue
luna-amber Luna-Amber
luna-green Luna-Green
luna-pink Luna-Pink
omega Omega

PREMIUM TEMPLATES

Create awesome applications in no time using the premium templates and impress your users.