DataScroller - Loader

A custom component can be used instead to load data on demand instead of the scroll event.

Documentation
Scroll Down to Load More Cars
  • Id: 827a6cf7
    Year: 1971
    Color: Red
  • Id: de279b7a
    Year: 1960
    Color: Maroon
  • Id: 6adf9216
    Year: 1984
    Color: Black
  • Id: 1a333394
    Year: 1980
    Color: Blue
  • Id: 4404cb24
    Year: 2004
    Color: White
  • Id: 955c6f4d
    Year: 2009
    Color: Brown
  • Id: 69390d45
    Year: 1998
    Color: Blue
  • Id: 613ab445
    Year: 1997
    Color: Silver
  • Id: d4e72f08
    Year: 2009
    Color: Orange
  • Id: ffa6018d
    Year: 2003
    Color: Blue
<style type="text/css">
    .logo {
        width: 5%
    }
    
    .detail {
        width: 95%;
        padding-left: 25px;
    }
    
    .detail td {
        font-size: 24px;
    }
    
    .ui-datascroller .ui-datascroller-item {
        border-bottom: 1px solid #A8A8A8;
        padding: 25px 10px;
        /* with the exported variables from Nova and Luna Themes*/
        border-bottom-color: var(--input-border-color, #A8A8A8);
    }
</style>


<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="pi pi-chevron-circle-down"/>
        </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>

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.