DataScroller - Loader A custom component can be used instead to load data on demand instead of the scroll event.
Scroll Down to Load More Cars
  • Id: 1f5b71d4
    Year: 1969
    Color: Orange
  • Id: 49b8caf1
    Year: 1998
    Color: White
  • Id: dd16a1bb
    Year: 2008
    Color: Black
  • Id: 6c18d3c9
    Year: 2003
    Color: Maroon
  • Id: 38d1000e
    Year: 1974
    Color: Orange
  • Id: 65d59da3
    Year: 2002
    Color: Blue
  • Id: cfaa64cb
    Year: 2003
    Color: Blue
  • Id: 9dc16685
    Year: 1998
    Color: Blue
  • Id: d1c45a98
    Year: 2007
    Color: Blue
  • Id: f45cedde
    Year: 1993
    Color: Blue
<h:form> 
    <p:dataScroller value="#{dataScrollerView.cars}" var="car" chunkSize="10">
        <f:facet name="header">
            Scroll Down to Load More Cars
        </f:facet>

        <f:facet name="loader">
            <p:commandButton type="button" value="More" icon="ui-icon-circle-triangle-s"/>
        </f:facet>

        <h:panelGrid columns="2" style="width:100%" columnClasses="logo,detail">
            <p:graphicImage name="demo/images/car/#{car.brand}-big.gif" /> 

            <p:outputPanel>
                <h:panelGrid columns="2" cellpadding="5">
                    <h:outputText value="Id:" />
                    <h:outputText value="#{car.id}" style="font-weight: bold"/>

                    <h:outputText value="Year:" />
                    <h:outputText value="#{car.year}" style="font-weight: bold"/>

                    <h:outputText value="Color:" />
                    <h:outputText value="#{car.color}" style="font-weight: bold"/>
                </h:panelGrid>
            </p:outputPanel>
        </h:panelGrid>
    </p:dataScroller>
</h:form>
                
PrimeTek, Copyright © 2017
All rights reserved.
Running PrimeFaces-6.2-SNAPSHOT on Mojarra-2.3.2.