DataScroller - Inline

In inline mode, data is loaded on scroll event of the component itself.

Scroll Down to Load More Cars
  • Id: e3dd7240
    Year: 1961
    Color: Silver
  • Id: a3dc3dc0
    Year: 1969
    Color: Maroon
  • Id: 4a060102
    Year: 1994
    Color: Blue
  • Id: c825a8f7
    Year: 1969
    Color: Yellow
  • Id: 75701759
    Year: 1962
    Color: Blue
  • Id: c05470e5
    Year: 1961
    Color: Yellow
  • Id: 4586254c
    Year: 1969
    Color: Black
  • Id: dc4cc9bf
    Year: 2004
    Color: Yellow
  • Id: 8b998a8f
    Year: 1967
    Color: White
  • Id: ac5c4d24
    Year: 1984
    Color: Green
<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" mode="inline" scrollHeight="500">
        <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>