• 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
Aruna A GillianCanadaKing, Christopher A Esq
Stacey Q FollerRussiaFeiner Bros
Octavia H BologniaItalyChapman, Ross E Esq
Jennifer H VenereRussiaCommercial Press
Mujtaba F SergiCanadaTruhlar And Truhlar Attys
DataTable: live scroll
NameCompany
Antonio N VocelkaBenton, John B Jr
Mayumi U VocelkaMorlong Associates
Jennifer G WaycottRousseaux, Michael Esq
Mujtaba B DilliardPrinting Dimensions
Salvatore X SchemmerBenton, John B Jr
Antonio D OldroydChapman, Ross E Esq
Ricardo J ShinkoPrinting Dimensions
Chavez C AmigonChapman, Ross E Esq
Salvatore C RimChapman, Ross E Esq
Faith X OldroydBuckley Miller Wright
Jones K FigeroaDorl, James J Esq
Stacey D IturbideMorlong Associates
Ashley N SergiMorlong Associates
Octavia I InouyePrinting Dimensions
Aika H SchemmerDorl, James J Esq
Deepesh S SaylorsChapman, Ross E Esq
Jeanfrancois N RoysterTruhlar And Truhlar Attys
Cody F MorascaRangoni Of Florence
Izzy V SchemmerFeiner Bros
Leja Q KolmetzDorl, James J Esq
DataTable: virtual scroll
NameCompany
Julie R NickaBuckley Miller Wright
Kaitlin A VocelkaChanay, Jeffrey A Esq
Darci L CampainChemel, James L Cpa
David Q KolmetzFeltz Printing Service
Murillo V SlusarskiChapman, Ross E Esq
Ivar P WieserPrinting Dimensions
Chavez G FerenczPrinting Dimensions
Kaitlin N FlosiKing, Christopher A Esq
Clifford G GlickBenton, John B Jr
Clifford L WaycottKing, Christopher A Esq
Clifford I SlusarskiFeltz Printing Service
Tony W SaylorsChanay, Jeffrey A Esq
Antonio E WaycottFeiner Bros
Antonio Y BologniaFeltz Printing Service
Alejandro Q OldroydBuckley Miller Wright
Morrow X AlbaresChapman, Ross E Esq
Costa B RulapaughDorl, James J Esq
Clifford Z StockhamBenton, John B Jr
Mayumi F SergiMorlong Associates
Wickens K MorascaKing, Christopher A Esq
Clifford O NestlePrinting Dimensions
Maisha Z NickaTruhlar And Truhlar Attys
Salvatore D BologniaPrinting Dimensions
Leja U KuskoChapman, Ross E Esq
Arvin P NickaBuckley Miller Wright
Aika R MaletDorl, James J Esq
Greenwood S KuskoCommercial Press
Adams M SaylorsPrinting Dimensions
Izzy P OldroydChemel, James L Cpa
Wickens J FollerCommercial Press
Jeanfrancois K MaletKing, Christopher A Esq
Kadeem Z FollerBuckley Miller Wright
Tony M BriddickDorl, James J Esq
Clifford D SchemmerFeltz Printing Service
Maria U AmigonPrinting Dimensions
James P DarakjyMorlong Associates
Kadeem V InouyeKing, Christopher A Esq
Aditya L VenereFeiner Bros
Octavia J BowleyBuckley Miller Wright
Juan R WaycottBuckley Miller Wright
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>