• 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
Munro V CaldareraRussiaTruhlar And Truhlar Attys
Octavia O GarufiJapanCommercial Press
Mujtaba B NickaItalyFeltz Printing Service
Cody Q RoysterItalyFeiner Bros
Ashley X CampainItalyBuckley Miller Wright
DataTable: live scroll
NameCompany
Jennifer T FerenczDorl, James J Esq
Kadeem W SergiFeltz Printing Service
Ashley U SlusarskiRangoni Of Florence
Adams K VocelkaFeiner Bros
Ricardo R InouyeDorl, James J Esq
Chavez H FollerChemel, James L Cpa
Greenwood Z MaletRousseaux, Michael Esq
Ricardo Q BologniaCommercial Press
Kaitlin Y FerenczBenton, John B Jr
Chavez E GillianBuckley Miller Wright
Silvio J RimFeltz Printing Service
Mayumi T OstroskyRousseaux, Michael Esq
Izzy K DilliardChapman, Ross E Esq
Smith C AlbaresChemel, James L Cpa
Kadeem A NestleBuckley Miller Wright
Leon A VenereBenton, John B Jr
Murillo D GauchoFeltz Printing Service
Mayumi Z CaldareraPrinting Dimensions
Clifford E PoquetteKing, Christopher A Esq
Juan Q VenereChanay, Jeffrey A Esq
DataTable: virtual scroll
NameCompany
Greenwood I IturbideChapman, Ross E Esq
Maisha S CaldareraMorlong Associates
James J RoysterFeltz Printing Service
Jeanfrancois F GlickChemel, James L Cpa
Claire N GlickBuckley Miller Wright
Leon E MaletTruhlar And Truhlar Attys
Leja F AlbaresChanay, Jeffrey A Esq
Francesco S MacleadFeltz Printing Service
Deepesh L InouyeChapman, Ross E Esq
Silvio T BowleyCommercial Press
Alejandro M StockhamFeltz Printing Service
Aika H PerinChanay, Jeffrey A Esq
Munro H RutaBenton, John B Jr
Antonio B PaprockiChapman, Ross E Esq
Juan M OstroskyFeltz Printing Service
Silvio C PoquetteChanay, Jeffrey A Esq
Smith W BologniaFeltz Printing Service
Clifford K CampainBuckley Miller Wright
Kaitlin C SaylorsFeltz Printing Service
Cody B GarufiChemel, James L Cpa
Murillo W CaudyTruhlar And Truhlar Attys
Ashley J RoysterDorl, James J Esq
Silvio Y FlosiMorlong Associates
Julie U AmigonBenton, John B Jr
Jones I CaldareraFeltz Printing Service
Francesco L InouyeMorlong Associates
Octavia S PaprockiBenton, John B Jr
Kadeem W InouyeRangoni Of Florence
Jefferson E SlusarskiChemel, James L Cpa
Deepesh X WaycottChemel, James L Cpa
Sinclair J AmigonRousseaux, Michael Esq
Darci Q MarrierFeltz Printing Service
Emily J WaycottChapman, Ross E Esq
Kaitlin E InouyeBuckley Miller Wright
Leon D PaprockiChapman, Ross E Esq
Izzy C IturbideChanay, Jeffrey A Esq
Wickens D BriddickCommercial Press
Adams Z MorascaRousseaux, Michael Esq
Cody B PoquetteMorlong Associates
Deepesh C CampainFeiner Bros
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>