ScrollPanel

ScrollPanel is used to display overflowed content with theme aware scrollbars instead of browser scrollbars.

Basic ScrollPanel

44366ff9
44366ff9
Volkswagen
1994
Maroon
645a77b8
645a77b8
Mercedes
1982
Orange
bf276fd0
bf276fd0
Opel
1972
Yellow
70826068
70826068
Audi
1964
Orange
6e943436
6e943436
Ferrari
1979
Green
93e4af10
93e4af10
Volkswagen
1996
Orange
5bef3156
5bef3156
Volvo
1985
Blue
1223bd2f
1223bd2f
Volvo
1992
Silver
00ad17ca
00ad17ca
Mercedes
1992
Red

Native ScrollPanel

44366ff9
44366ff9
Volkswagen
1994
Maroon
645a77b8
645a77b8
Mercedes
1982
Orange
bf276fd0
bf276fd0
Opel
1972
Yellow
70826068
70826068
Audi
1964
Orange
6e943436
6e943436
Ferrari
1979
Green
93e4af10
93e4af10
Volkswagen
1996
Orange
5bef3156
5bef3156
Volvo
1985
Blue
1223bd2f
1223bd2f
Volvo
1992
Silver
00ad17ca
00ad17ca
Mercedes
1992
Red

Source

<h3>Default ScrollPanel</h3>
<p:scrollPanel style="width:250px;height:200px">
    <p:dataGrid var="car" value="#{tableBean.carsSmall}" columns="3">
        <p:panel header="#{car.model}" style="text-align:center">
            <h:panelGrid columns="1" style="width:100%">
                <h:outputText value="#{car.model}" />
                <h:outputText value="#{car.manufacturer}" />
                <h:outputText value="#{car.year}" />
                <h:outputText value="#{car.color}" />
            </h:panelGrid>
        </p:panel>
    </p:dataGrid>
</p:scrollPanel>

<h3>Native ScrollPanel</h3>
<p:scrollPanel style="width:250px;height:200px" scrollMode="native">
    <p:dataGrid var="car" value="#{tableBean.carsSmall}" columns="3">
        <p:panel header="#{car.model}" style="text-align:center">
            <h:panelGrid columns="1" style="width:100%">
                <h:outputText value="#{car.model}" />
                <h:outputText value="#{car.manufacturer}" />
                <h:outputText value="#{car.year}" />
                <h:outputText value="#{car.color}" />
            </h:panelGrid>
        </p:panel>
    </p:dataGrid>
</p:scrollPanel>