• 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
Cody A AlbaresIndiaChapman, Ross E Esq
Stacey J SchemmerAustraliaPrinting Dimensions
Alejandro A PerinArgentinaRangoni Of Florence
Maisha Y CampainAustraliaChapman, Ross E Esq
Cody P CaldareraGermanyCommercial Press
DataTable: live scroll
NameCompany
Aika H MaletFeiner Bros
Tony U WaycottRangoni Of Florence
Clifford Y MorascaCommercial Press
Emily I MaletChapman, Ross E Esq
Jones P FigeroaPrinting Dimensions
Johnson O GillianCommercial Press
Jeanfrancois G AmigonChapman, Ross E Esq
Tony A MacleadRousseaux, Michael Esq
Misaki D RoysterChanay, Jeffrey A Esq
Francesco A OldroydTruhlar And Truhlar Attys
Murillo A CaudyBuckley Miller Wright
Ricardo G NickaTruhlar And Truhlar Attys
Cody C FlosiMorlong Associates
Emily J CampainBenton, John B Jr
Costa R CampainDorl, James J Esq
Salvatore T PerinBenton, John B Jr
Claire Z WieserFeiner Bros
Jefferson K WaycottRousseaux, Michael Esq
Nicolas I MarrierTruhlar And Truhlar Attys
Jefferson Z AlbaresCommercial Press
DataTable: virtual scroll
NameCompany
Claire F TollnerRangoni Of Florence
Mujtaba M KolmetzChanay, Jeffrey A Esq
Izzy S NestleRousseaux, Michael Esq
Jefferson P SlusarskiKing, Christopher A Esq
Aika L CampainBuckley Miller Wright
Nicolas Q GarufiChemel, James L Cpa
Julie D WaycottChemel, James L Cpa
Octavia N MacleadCommercial Press
Kadeem A FigeroaFeiner Bros
Murillo E OstroskyFeiner Bros
Emily N FerenczChemel, James L Cpa
Leon P RutaRousseaux, Michael Esq
Rodrigues M ChuiKing, Christopher A Esq
Chavez P IturbideChapman, Ross E Esq
Antonio W SlusarskiChemel, James L Cpa
Octavia H MaletChemel, James L Cpa
Kaitlin E GauchoRangoni Of Florence
Salvatore U RutaDorl, James J Esq
Faith B SergiChemel, James L Cpa
Kaitlin A StockhamBenton, John B Jr
Silvio F WieserPrinting Dimensions
Julie P PoquetteChemel, James L Cpa
Darci Z SchemmerDorl, James J Esq
Aika N MarrierBenton, John B Jr
Nicolas S NestleTruhlar And Truhlar Attys
Jefferson V GillianPrinting Dimensions
Sinclair L KuskoRangoni Of Florence
Rodrigues I TollnerChanay, Jeffrey A Esq
Kadeem V DilliardRousseaux, Michael Esq
Maisha M CaldareraCommercial Press
Isabel M CaldareraDorl, James J Esq
Francesco G RoysterChanay, Jeffrey A Esq
Silvio Q MacleadMorlong Associates
Greenwood N SergiCommercial Press
Stacey R MarrierCommercial Press
Misaki X PoquetteDorl, James J Esq
Arvin K DoeRousseaux, Michael Esq
Chavez S CaldareraKing, Christopher A Esq
Leja K CampainFeiner Bros
Clifford D CaldareraRousseaux, Michael 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>