• 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
Theme
Theme
Preset primefaces.THEME
Apple Liquid Glass style: translucent overlays, menus and bars that blur the page behind them, capsule buttons.
Color scheme color-scheme
Input style p-input-filled
Density data-p-density
Direction primefaces.DIR
Colors
Primary --p-primary-base
Surface --p-surface-*
Shape and motion
Button shape --p-button-border-radius
Shadows --p-*-shadow
Animations --p-transition-duration
Ripple --p-ripple-opacity
Border radius --p-border-radius-*
Typography
Focus ring
Form field
CSS
Only the tokens that differ from the preset.

                        
                    

Loading States

Components that load data with Ajax show what is loading without any configuration: tables show a bar at the top and fade the rows that are about to be replaced, togglers become a spinner, tabs run their active bar and buttons show a spinner while they are disabled. Fast responses do not flicker, the state appears after a short delay. The examples simulate a slow server (see LoadingView.java).

DataTable: paging, sorting, filtering and row expansion
Row TogglerNameCountryCompany
Darci X StensethArgentinaRousseaux, Michael Esq
Stacey S NestleFranceMorlong Associates
Tony U BowleyIndiaPrinting Dimensions
Jennifer M FlosiItalyDorl, James J Esq
Aditya P AmigonGermanyChanay, Jeffrey A Esq
DataTable: live scroll
NameCompany
Misaki Z BowleyBenton, John B Jr
Maisha W MarrierRangoni Of Florence
Jones G PaprockiMorlong Associates
David A KolmetzChemel, James L Cpa
Johnson T NickaBuckley Miller Wright
Johnson J WieserCommercial Press
Adams B BowleyBenton, John B Jr
Maria E WieserRousseaux, Michael Esq
Leon F MaletPrinting Dimensions
Darci I DarakjyRangoni Of Florence
Johnson R BowleyTruhlar And Truhlar Attys
Stacey C SchemmerRousseaux, Michael Esq
Wickens A VocelkaBuckley Miller Wright
Alejandro M SchemmerChemel, James L Cpa
Aditya I RulapaughKing, Christopher A Esq
Francesco J RoysterChemel, James L Cpa
Greenwood K SaylorsBenton, John B Jr
Nicolas O WaycottBuckley Miller Wright
Jennifer J VenereBenton, John B Jr
Izzy Z MacleadPrinting Dimensions
DataTable: virtual scroll
NameCompany
Francesco B IturbideFeiner Bros
Murillo D RoysterDorl, James J Esq
Johnson O FerenczChapman, Ross E Esq
Sinclair E MaletRousseaux, Michael Esq
Tony O VenereBuckley Miller Wright
Salvatore A GauchoChanay, Jeffrey A Esq
Morrow W KuskoChemel, James L Cpa
Stacey A InouyeRangoni Of Florence
Maisha E IturbideChapman, Ross E Esq
Tony C CampainTruhlar And Truhlar Attys
Salvatore O AmigonChemel, James L Cpa
Claire I StensethFeltz Printing Service
Maisha L KolmetzChapman, Ross E Esq
Arvin Q DilliardBenton, John B Jr
Aika N ButtTruhlar And Truhlar Attys
Deepesh N OstroskyBuckley Miller Wright
Aditya I SchemmerChapman, Ross E Esq
David J StockhamBenton, John B Jr
Antonio J AlbaresPrinting Dimensions
Mujtaba A PerinRousseaux, Michael Esq
Stacey F WaycottTruhlar And Truhlar Attys
James K KolmetzBuckley Miller Wright
Adams Y GarufiRousseaux, Michael Esq
Silvio W SchemmerRangoni Of Florence
Chavez P IturbideDorl, James J Esq
Stacey Q ButtBuckley Miller Wright
Clifford M SlusarskiPrinting Dimensions
Jones K AlbaresFeltz Printing Service
Juan C AlbaresRousseaux, Michael Esq
Darci R MarrierPrinting Dimensions
Johnson N FollerDorl, James J Esq
Murillo M BologniaFeltz Printing Service
Silvio X GarufiChemel, James L Cpa
Ricardo Z BriddickChapman, Ross E Esq
Wickens V KolmetzTruhlar And Truhlar Attys
James H RoysterCommercial Press
Jennifer G CampainBuckley Miller Wright
Stacey C GlickFeiner Bros
Alejandro R WhobreyPrinting Dimensions
Antonio J VocelkaChanay, Jeffrey A Esq
TreeTable: expand a node
NameType
Tree: expand a node (dynamic)
TabView: open a tab (dynamic)

The content of a tab is loaded each time it is opened.

AccordionPanel: open a tab (dynamic)
Fieldset: expand (dynamic)
SelectOneMenu: open (dynamic)
CommandButton
AutoComplete

Usage


<h:form>
    <div class="card">
        <h5>DataTable: paging, sorting, filtering and row expansion</h5>
        <p:dataTable var="customer" value="#{loadingView.customers}" paginator="true" rows="5"
                     paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
            <p:ajax event="rowToggle" listener="#{loadingView.slow}"/>

            <p:column style="width:2rem" ariaHeaderText="Row Toggler">
                <p:rowToggler/>
            </p:column>
            <p:column headerText="Name" sortBy="#{customer.name}" filterBy="#{customer.name}">
                <h:outputText value="#{customer.name}"/>
            </p:column>
            <p:column headerText="Country" sortBy="#{customer.country}" filterBy="#{customer.country}">
                <h:outputText value="#{customer.country.name}"/>
            </p:column>
            <p:column headerText="Company" sortBy="#{customer.company}" filterBy="#{customer.company}">
                <h:outputText value="#{customer.company}"/>
            </p:column>

            <p:rowExpansion>
                <div class="p-3">
                    #{customer.name} works at #{customer.company} (#{customer.country.name}), represented
                    by #{customer.representative.name}.
                </div>
            </p:rowExpansion>
        </p:dataTable>
    </div>

    <div class="grid">
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>DataTable: live scroll</h5>
                <p:dataTable var="customer" value="#{loadingView.liveScrollCustomers}" scrollable="true"
                             scrollHeight="250" liveScroll="true" scrollRows="20">
                    <p:column headerText="Name">
                        <h:outputText value="#{customer.name}"/>
                    </p:column>
                    <p:column headerText="Company">
                        <h:outputText value="#{customer.company}"/>
                    </p:column>
                </p:dataTable>
            </div>
        </div>
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>DataTable: virtual scroll</h5>
                <p:dataTable var="customer" value="#{loadingView.virtualScrollCustomers}" scrollable="true"
                             scrollHeight="250" virtualScroll="true" scrollRows="20" rows="40">
                    <p:column headerText="Name">
                        <h:outputText value="#{customer.name}"/>
                    </p:column>
                    <p:column headerText="Company">
                        <h:outputText value="#{customer.company}"/>
                    </p:column>
                </p:dataTable>
            </div>
        </div>
    </div>

    <div class="grid">
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>TreeTable: expand a node</h5>
                <p:treeTable value="#{loadingView.treeTable}" var="document">
                    <p:ajax event="expand" listener="#{loadingView.slow}"/>

                    <p:column headerText="Name">
                        <h:outputText value="#{document.name}"/>
                    </p:column>
                    <p:column headerText="Type">
                        <h:outputText value="#{document.type}"/>
                    </p:column>
                </p:treeTable>
            </div>
        </div>
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>Tree: expand a node (dynamic)</h5>
                <p:tree value="#{loadingView.tree}" var="document" dynamic="true">
                    <p:ajax event="expand" listener="#{loadingView.slow}"/>

                    <p:treeNode expandedIcon="pi pi-folder-open" collapsedIcon="pi pi-folder">
                        <h:outputText value="#{document.name}"/>
                    </p:treeNode>
                    <p:treeNode type="app" icon="pi pi-save">
                        <h:outputText value="#{document.name}"/>
                    </p:treeNode>
                    <p:treeNode type="document" icon="pi pi-file">
                        <h:outputText value="#{document.name}"/>
                    </p:treeNode>
                    <p:treeNode type="excel" icon="pi pi-file-excel">
                        <h:outputText value="#{document.name}"/>
                    </p:treeNode>
                    <p:treeNode type="travel" icon="pi pi-file-pdf">
                        <h:outputText value="#{document.name}"/>
                    </p:treeNode>
                    <p:treeNode type="picture" icon="pi pi-image">
                        <h:outputText value="#{document.name}"/>
                    </p:treeNode>
                    <p:treeNode type="video" icon="pi pi-video">
                        <h:outputText value="#{document.name}"/>
                    </p:treeNode>
                </p:tree>
            </div>
        </div>
    </div>

    <div class="grid">
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>TabView: open a tab (dynamic)</h5>
                <p:tabView dynamic="true" cache="false">
                    <p:ajax event="tabChange" listener="#{loadingView.slow}"/>

                    <p:tab title="Overview">
                        <p class="m-0">The content of a tab is loaded each time it is opened.</p>
                    </p:tab>
                    <p:tab title="Details">
                        <p class="m-0">Loaded on demand: the active bar of the tab runs meanwhile.</p>
                    </p:tab>
                    <p:tab title="History">
                        <p class="m-0">The current tab stays active until the new content is shown.</p>
                    </p:tab>
                </p:tabView>
            </div>
        </div>
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>AccordionPanel: open a tab (dynamic)</h5>
                <p:accordionPanel dynamic="true" cache="false" activeIndex="-1">
                    <p:ajax event="tabChange" listener="#{loadingView.slow}"/>

                    <p:tab title="Overview">
                        <p class="m-0">The content of a tab is loaded each time it is opened.</p>
                    </p:tab>
                    <p:tab title="Details">
                        <p class="m-0">Loaded on demand: the toggler becomes a spinner meanwhile.</p>
                    </p:tab>
                </p:accordionPanel>
            </div>
        </div>
    </div>

    <div class="grid">
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>Fieldset: expand (dynamic)</h5>
                <p:fieldset legend="Details" toggleable="true" collapsed="true" dynamic="true">
                    <p class="m-0">#{loadingView.fieldsetContent}</p>
                </p:fieldset>
            </div>
        </div>
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>SelectOneMenu: open (dynamic)</h5>
                <p:selectOneMenu dynamic="true" style="width: 15rem">
                    <f:selectItem itemLabel="Select a country" itemValue=""/>
                    <f:selectItems value="#{loadingView.countryNames}"/>
                </p:selectOneMenu>
            </div>
        </div>
    </div>

    <div class="grid">
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>CommandButton</h5>
                <p:commandButton value="Save" icon="pi pi-check" action="#{loadingView.slow}"
                                 process="@this" styleClass="mr-2"/>
                <p:commandButton value="Delete" action="#{loadingView.slow}" process="@this"
                                 styleClass="p-button-danger p-button-outlined"/>
            </div>
        </div>
        <div class="col-12 md:col-6">
            <div class="card">
                <h5>AutoComplete</h5>
                <p:autoComplete completeMethod="#{loadingView.completeCountry}" placeholder="Search a country"
                                scrollHeight="250"/>
            </div>
        </div>
    </div>
</h:form>