Mirage LIVE PREVIEW

DataScroller - Basic

DataScroller displays data with on demand loading using scroll.

Documentation
Scroll Down to Load More Cars
  • Id: 2998af65
    Year: 2000
    Color: White
  • Id: 46575b41
    Year: 1987
    Color: Blue
  • Id: 0dfbcbfa
    Year: 1994
    Color: Red
  • Id: 6f04a0c9
    Year: 1966
    Color: Maroon
  • Id: 6e086504
    Year: 2009
    Color: White
  • Id: e421b7a5
    Year: 2003
    Color: Red
  • Id: c7b1c483
    Year: 1967
    Color: Silver
  • Id: 29857893
    Year: 2007
    Color: White
  • Id: 2a54b8c6
    Year: 1998
    Color: Maroon
  • Id: ca2b0393
    Year: 1976
    Color: Yellow
<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>

        <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>