DataScroller - Basic

DataScroller displays data with on demand loading using scroll.

Scroll Down to Load More Cars
  • Id: ac5922b7
    Year: 1988
    Color: Maroon
  • Id: 345501fc
    Year: 1994
    Color: Blue
  • Id: f338600f
    Year: 2002
    Color: Yellow
  • Id: 162ad3cf
    Year: 2008
    Color: Red
  • Id: 868f37d8
    Year: 1967
    Color: Red
  • Id: 369d3b08
    Year: 1998
    Color: Red
  • Id: 140570ea
    Year: 1972
    Color: Black
  • Id: e6517a3d
    Year: 1996
    Color: White
  • Id: 855c90c3
    Year: 1985
    Color: Orange
  • Id: 95103d9c
    Year: 2009
    Color: Red
<h:form> 
    <p:dataScroller value="#{dataScrollerView.cars}" var="car" chunkSize="10">
        <f:facet name="header">
            Scroll Down to Load More Cars
        </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>