• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

DataScroller Basic

DataScroller displays data with on demand loading using scroll.

DataScroller Tag Documentation

DataScroller displays a collection of data featuring on demand loading using scroll.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
buffer int false 10 Percentage height of the buffer between the bottom of the page and the scroll position to initiate the load for the new chunk. Value is defined in integer and default is 10 meaning load would happen after 90% of the viewport is scrolled down.
chunkSize int false 0 Number of items to fetch.
first int false 0 Index of the first data to display.
lazy boolean false True, if the value-binding is instance of LazyDataModel. Defines if lazy loading is enabled for the data component.
mode String false document Defines the target to listen for scroll event, valid values are "document" and "inline".
rowIndexVar String false Name of iterator to refer each row index.
rowStatePreserved boolean false false Keeps state of its children on a per-row basis.
rows int false 0 Number of rows to display per page. Default value is 0 meaning to display all data available.
scrollHeight String false Defines pixel height of the viewport in inline mode.
startAtBottom boolean false false If the scrollAtBottom is enabled, scroll position is at bottom and data loading starts from the bottom.
style String false Inline style of the component.
styleClass String false Style class of the component.
value Object true Datasource of the component.
var String true Name of the iterator variable that references each element in the data set.
virtualScroll boolean false false Loads data on demand as the scrollbar gets close to the bottom.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc Basic Inline Loader Loading
Scroll Down to Load More Products
  • Yoga Set
    Product Description
    Fitness
    $20.00 In Stock
  • Lime Band
    Product Description
    Fitness
    $79.00 In Stock
  • Gold Phone Case
    Product Description
    Accessories
    $24.00 Out of Stock
  • Chakra Bracelet
    Product Description
    Accessories
    $32.00 Low Stock
  • Yoga Mat
    Product Description
    Fitness
    $20.00 In Stock
  • Chakra Bracelet
    Product Description
    Accessories
    $32.00 Low Stock
  • Green T-Shirt
    Product Description
    Clothing
    $49.00 In Stock
  • Mini Speakers
    Product Description
    Clothing
    $85.00 In Stock
  • Yellow Earbuds
    Product Description
    Electronics
    $89.00 In Stock
  • Lime Band
    Product Description
    Fitness
    $79.00 In Stock

Usage


<div class="card">
    <h:form>
        <p:dataScroller value="#{dataScrollerView.products}" var="product" chunkSize="10">
            <f:facet name="header">
                Scroll Down to Load More Products
            </f:facet>

            <div class="product">
                <div class="product-list-item p-5">
                    <p:graphicImage name="demo/images/product/#{product.image}"/>
                    <div class="product-list-detail">
                        <div class="product-name">#{product.name}</div>
                        <div class="product-description">#{product.description}</div>
                        <p:rating readonly="true" value="#{product.rating}"/>
                        <i class="pi pi-tag product-category-icon"/><span
                            class="product-category">#{product.category}</span>
                    </div>
                    <div class="product-list-action">
                        <h:outputText value="#{product.price}" styleClass="product-price">
                            <f:convertNumber currencySymbol="$" type="currency"/>
                        </h:outputText>
                        <p:commandButton value="Add To Cart" icon="pi pi-shopping-cart"
                                         disabled="#{product.inventoryStatus == 'OUTOFSTOCK'}">
                        </p:commandButton>
                        <span class="product-badge status-#{product.inventoryStatus.name().toLowerCase()}">#{product.inventoryStatus.text}</span>
                    </div>
                </div>
            </div>
        </p:dataScroller>
    </h:form>
</div>