• 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

OutputPanel

Output panel is a container element with several use cases such as autoUpdate and deferred loading. This example demonstrates the deferred loading feature with two modes where the content of the panel is loaded after the page itself is loaded to speed up initial page load time. There are two deferred modes, "load" (after page load) and "visible" (after page load and visible after page scroll). A progress indicator is also provided while loading the content.

OutputPanel Tag Documentation

OutputPanel is a container component with deferred loading and layout options.

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.
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
deferred boolean false false When true, panel content is loaded lazily.
deferredMode String false load Mode of deferred loading, valid values are "load" and "visible".
layout String false block Layout of the panel, valid values are "block" and "inline".
loaded Boolean false Whether the panel content is loaded.
style String false Inline style of the component.
styleClass String false Style class of the component.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc

Usage


<h:form>
    <div class="card" style="min-height: 175px">
        <p:outputPanel deferred="true">
            <h5>Loaded after page load</h5>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
                Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </p:outputPanel>
    </div>

    <div class="card" style="min-height: 230px">
        <p:tabView dynamic="true">
            <p:tab title="Skeletons">
                <p:outputPanel deferred="true" class="mt-2">
                    <p:ajax event="load" listener="#{outputPanelView.loadData}"/>
                    <f:facet name="loading">
                        <p:skeleton width="200px" height="21px" class="mb-4"/>
                        <p:skeleton width="100%" height="42px"/>
                    </f:facet>
                    <h5>#{outputPanelView.data.title}</h5>
                    <p>#{outputPanelView.data.body}</p>
                </p:outputPanel>
            </p:tab>
            <p:tab title="Ajax / Loaded">
                <p:outputPanel deferred="true" loaded="#{not empty outputPanelView.data2}" class="mt-2">
                    <p:ajax event="load" listener="#{outputPanelView.loadData2}"/>
                    <f:facet name="loading">
                        <p:skeleton width="200px" height="21px" class="mb-4"/>
                        <p:skeleton width="100%" height="42px"/>
                    </f:facet>
                    <h5>#{outputPanelView.data2.title}</h5>
                    <p>#{outputPanelView.data2.body}</p>
                </p:outputPanel>
            </p:tab>
        </p:tabView>
    </div>

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

    <div class="card">
        <p:outputPanel deferred="true" deferredMode="visible">
            <h5>Loaded after the panel becomes visible on page scroll</h5>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
                Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
        </p:outputPanel>
    </div>
</h:form>