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: 521ff60b
    Year: 1978
    Color: Red
  • Id: 220ff47b
    Year: 1972
    Color: Blue
  • Id: 18db82fb
    Year: 1962
    Color: Black
  • Id: e71599c5
    Year: 2002
    Color: White
  • Id: ffb66552
    Year: 2003
    Color: Orange
  • Id: d9ff0af6
    Year: 1965
    Color: Yellow
  • Id: 2a0bef40
    Year: 1964
    Color: Red
  • Id: 694a32c8
    Year: 1995
    Color: Brown
  • Id: 8eeee118
    Year: 1990
    Color: Blue
  • Id: 6acd1fde
    Year: 1976
    Color: Brown
    <p:dataScroller value="#{}" var="car" chunkSize="10">
        <f:facet name="header">
            Scroll Down to Load More Cars

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

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

                <h:panelGrid columns="2" cellpadding="5">
                    <h:outputText value="Id:" />
                    <h:outputText value="#{}" 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"/>