• 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.

                        
                    

Deferred

Deferred loads its content with Ajax to speed up the page load and shows a placeholder meanwhile: a loading indicator or the loading facet. mode defines when the content is loaded: after the page (default), when the component becomes visible or manual via the client side API.

Deferred Tag Documentation

Deferred loads its content via AJAX after the page was rendered and shows a placeholder until then.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
ref String false generated ('pf_' + componentClientId) Name of the client side component, e.g. to access it via PF('name').
widgetVar String false Deprecated, use ref instead. Name of the client side component.
layout String false block Layout of the container, valid values are "block" and "inline".
loaded Boolean false Marks the content as loaded: with true it is rendered directly, without load request and load listener. With false or no value the component decides itself.
mode String false load When the content is loaded: "load" (right after the component was rendered), "visible" (when the component enters the viewport) or "manual" (via the client API).
style String false Inline style of the component.
styleClass String false Style class of the component.
Loading...
Loaded after page load
Loading facet
Manual
Tabs

The content of the second tab is loaded when the tab is opened for the first time.

Loaded when it becomes visible on page scroll

Usage


<h:form>
    <div class="card" style="min-height: 175px">
        <h5>Loaded after page load</h5>
        <p:deferred>
            <p:ajax event="load" listener="#{deferredView.loadBasic}"/>

            <p>#{deferredView.basic}</p>
        </p:deferred>
    </div>

    <div class="card" style="min-height: 175px">
        <h5>Loading facet</h5>
        <p:deferred>
            <f:facet name="loading">
                <p:skeleton width="200px" height="21px" styleClass="mb-4"/>
                <p:skeleton width="100%" height="42px"/>
            </f:facet>
            <p:ajax event="load" listener="#{deferredView.loadSkeleton}"/>

            <h6>#{deferredView.skeleton.title}</h6>
            <p>#{deferredView.skeleton.body}</p>
        </p:deferred>
    </div>

    <div class="card">
        <h5>Manual</h5>
        <p:commandButton type="button" value="Load" icon="pi pi-download" onclick="PF('manualDeferred').load()"
                         styleClass="mb-3"/>

        <p:deferred ref="manualDeferred" mode="manual">
            <p:ajax event="load" listener="#{deferredView.loadManual}"/>

            <p>#{deferredView.manual}</p>
        </p:deferred>
    </div>

    <div class="card">
        <h5>Tabs</h5>
        <p:tabView>
            <p:tab title="Overview">
                <p>The content of the second tab is loaded when the tab is opened for the first time.</p>
            </p:tab>
            <p:tab title="Details">
                <p:deferred mode="visible">
                    <f:facet name="loading">
                        <p:skeleton width="100%" height="42px"/>
                    </f:facet>
                    <p:ajax event="load" listener="#{deferredView.loadTab}"/>

                    <p>#{deferredView.tab}</p>
                </p:deferred>
            </p:tab>
        </p:tabView>
    </div>

    <div style="height:1000px"></div>

    <div class="card">
        <h5>Loaded when it becomes visible on page scroll</h5>
        <p:deferred mode="visible">
            <f:facet name="loading">
                <p:skeleton width="100%" height="63px"/>
            </f:facet>
            <p:ajax event="load" listener="#{deferredView.loadVisible}"/>

            <p>#{deferredView.visible}</p>
        </p:deferred>
    </div>
</h:form>