• 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
Alejandro I AmigonAustraliaMorlong Associates
Jefferson Q WhobreySpainBenton, John B Jr
Munro A KolmetzSpainBenton, John B Jr
Greenwood K ButtCanadaTruhlar And Truhlar Attys
Octavia T VocelkaRussiaChanay, Jeffrey A Esq
DataTable: live scroll
NameCompany
Emily O MorascaFeiner Bros
Aditya M MaletChapman, Ross E Esq
Kadeem Z DoeFeltz Printing Service
Johnson J NestleRangoni Of Florence
Ricardo M SergiFeiner Bros
Murillo F BowleyCommercial Press
Mayumi B FerenczCommercial Press
Jefferson B MacleadRousseaux, Michael Esq
Maisha G WhobreyBenton, John B Jr
Tony D SlusarskiMorlong Associates
Mayumi N WaycottDorl, James J Esq
Wickens Q MaletChanay, Jeffrey A Esq
Mujtaba D PerinChapman, Ross E Esq
Maisha R BologniaRangoni Of Florence
Kaitlin Q PoquetteRangoni Of Florence
Emily G WaycottRangoni Of Florence
Tony H MaletFeiner Bros
Aruna B PerinBuckley Miller Wright
James U DarakjyFeltz Printing Service
Octavia C FerenczCommercial Press
DataTable: virtual scroll
NameCompany
Adams S RimChanay, Jeffrey A Esq
Murillo L MaletDorl, James J Esq
Francesco U FollerPrinting Dimensions
Clifford E CaudyCommercial Press
Darci L SaylorsMorlong Associates
Julie S GlickMorlong Associates
Murillo Z RutaDorl, James J Esq
Jefferson E WaycottChemel, James L Cpa
Aika L CampainBuckley Miller Wright
David M GauchoDorl, James J Esq
Smith B StensethPrinting Dimensions
Alejandro O NestleRousseaux, Michael Esq
Jennifer J MorascaCommercial Press
Tony U SergiChemel, James L Cpa
Faith E VenereChanay, Jeffrey A Esq
Johnson Z PaprockiCommercial Press
Wickens U RimChemel, James L Cpa
Ivar J PaprockiChemel, James L Cpa
Alejandro X NestleRangoni Of Florence
Rodrigues D CampainMorlong Associates
Mujtaba O MarrierMorlong Associates
Alejandro E WhobreyChanay, Jeffrey A Esq
Smith X AlbaresBenton, John B Jr
Jeanfrancois G SchemmerFeiner Bros
Johnson M RutaKing, Christopher A Esq
Nicolas Z GarufiChapman, Ross E Esq
Antonio O StensethMorlong Associates
Ashley G RimPrinting Dimensions
Mujtaba W MacleadRangoni Of Florence
Clifford H CampainChanay, Jeffrey A Esq
Arvin B RimChapman, Ross E Esq
Francesco L SlusarskiDorl, James J Esq
Morrow B ShinkoFeiner Bros
Faith A CampainRousseaux, Michael Esq
Silvio E CaldareraDorl, James J Esq
Munro Z RulapaughTruhlar And Truhlar Attys
Rodrigues I SaylorsKing, Christopher A Esq
Smith I BologniaDorl, James J Esq
Darci A PerinRousseaux, Michael Esq
Nicolas T RulapaughKing, Christopher 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>