• 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

Dashboard

Dashboard is a layout component featuring dragdrop based content reordering similar to portal environments. Responsive layout requires PrimeFlex CSS.

Dashboard Tag Documentation

Dashboard provides a portal like layout with drag-drop based reorder capabilities.

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.
disabled boolean false false Disables the component.
model DashboardModel false Dashboard model instance representing the layout of the UI.
reordering boolean false true Allow reordering of panels.
responsive boolean false false In responsive mode, PrimeFlex can be used to dynamically size columns and responsiveness.
scope String false dashboard Scope for dashboard drag and drop behaviour. Items can be dragged between multiple dashboards with the same scope.
style String false Inline style of the dashboard container.
styleClass String false Style class of the dashboard container.
var String false Name of collection iterator which will be the value of DashboardWidget.getValue().
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc
Responsive
Legacy
Sports
Sports Content
Finance
Finance Content
Lifestyle
Lifestyle Content
Weather
Weather Content
Politics
Politics Content

Usage


<style>
.legacy .ui-panel, .legacy.div.ui-state-hover {
    margin: 10px;
}
.legacy .ui-dashboard-column {
    width: 220px;
}
.ui-dashboard-active {
    border-color: var(--primary-color);
    border-width: 3px !important;
    border-style: dashed;
}
.ui-dashboard-hover {
    border-color: #C2E085;
    border-width: 3px !important;
    border-style: solid;
}
body .ui-panel.chart-dashlet .ui-panel-content .ui-chart {
    height: 250px;
    max-height: 250px;
}
</style>

<h:form id="form">
    <p:growl id="msgs" showDetail="true" skipDetailIfEqualsSummary="true">
        <p:autoUpdate />
    </p:growl>

    <div class="card">
        <h5 class="mt-0">Responsive</h5>
        <p:dashboard id="responsive" model="#{dashboardView.responsiveModel}" responsive="true">
            <p:ajax event="reorder" listener="#{dashboardView.handleReorder}" />

            <p:panel id="bar" header="Bar" closable="true" styleClass="chart-dashlet" >
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <f:facet name="options">
                    <p:menu>
                        <p:submenu label="Panel Size">
                            <p:menuitem action="#{dashboardView.onDashboardResize('bar', 'xl:col-4')}" immediate="true" update="@form">
                                1/3 <p:graphicImage name="demo/images/dashboard/onethird.png" styleClass="ml-2" alt="one third" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('bar', 'xl:col-6')}" immediate="true" update="@form">
                                1/2 <p:graphicImage name="demo/images/dashboard/onehalf.png" styleClass="ml-2" alt="one half" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('bar', 'xl:col-8')}" immediate="true" update="@form">
                                2/3 <p:graphicImage name="demo/images/dashboard/twothirds.png" styleClass="ml-2" alt="two thirds" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('bar', 'xl:col-12')}" immediate="true" update="@form">
                                Full <p:graphicImage name="demo/images/dashboard/full.png" styleClass="ml-2" alt="full" />
                            </p:menuitem>
                        </p:submenu>
                    </p:menu>
                </f:facet>
                
                <p:chart value="#{chartView.barModel}" style="width: 100%; height: 100%;" />
            </p:panel>

            <p:panel id="stacked" header="Stacked" closable="true" styleClass="chart-dashlet" >
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <f:facet name="options">
                    <p:menu>
                        <p:submenu label="Panel Size">
                            <p:menuitem action="#{dashboardView.onDashboardResize('stacked', 'xl:col-4')}" immediate="true" update="@form">
                                1/3 <p:graphicImage name="demo/images/dashboard/onethird.png" styleClass="ml-2" alt="one third" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('stacked', 'xl:col-6')}" immediate="true" update="@form">
                                1/2 <p:graphicImage name="demo/images/dashboard/onehalf.png" styleClass="ml-2" alt="one half" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('stacked', 'xl:col-8')}" immediate="true" update="@form">
                                2/3 <p:graphicImage name="demo/images/dashboard/twothirds.png" styleClass="ml-2" alt="two thirds" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('stacked', 'xl:col-12')}" immediate="true" update="@form">
                                Full <p:graphicImage name="demo/images/dashboard/full.png" styleClass="ml-2" alt="full" />
                            </p:menuitem>
                        </p:submenu>
                    </p:menu>
                </f:facet>
                <p:chart value="#{chartView.stackedBarModel}" style="width: 100%; height: 100%;" />
            </p:panel>

            <p:panel id="donut" header="Doughnut" closable="true" styleClass="chart-dashlet" >
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <f:facet name="options">
                    <p:menu>
                        <p:submenu label="Panel Size">
                            <p:menuitem action="#{dashboardView.onDashboardResize('donut', 'xl:col-4')}" immediate="true" update="@form">
                                1/3 <p:graphicImage name="demo/images/dashboard/onethird.png" styleClass="ml-2" alt="one third" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('donut', 'xl:col-6')}" immediate="true" update="@form">
                                1/2 <p:graphicImage name="demo/images/dashboard/onehalf.png" styleClass="ml-2" alt="one half" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('donut', 'xl:col-8')}" immediate="true" update="@form">
                                2/3 <p:graphicImage name="demo/images/dashboard/twothirds.png" styleClass="ml-2" alt="two thirds" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('donut', 'xl:col-12')}" immediate="true" update="@form">
                                Full <p:graphicImage name="demo/images/dashboard/full.png" styleClass="ml-2" alt="full" />
                            </p:menuitem>
                        </p:submenu>
                    </p:menu>
                </f:facet>

                <p:chart value="#{chartView.donutModel}" style="width: 100%; height: 100%;" />
            </p:panel>

            <p:panel id="cartesian" header="Cartesian" closable="true" styleClass="chart-dashlet" >
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <f:facet name="options">
                    <p:menu>
                        <p:submenu label="Panel Size">
                            <p:menuitem action="#{dashboardView.onDashboardResize('cartesian', 'xl:col-4')}" immediate="true" update="@form">
                                1/3 <p:graphicImage name="demo/images/dashboard/onethird.png" styleClass="ml-2" alt="one third" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('cartesian', 'xl:col-6')}" immediate="true" update="@form">
                                1/2 <p:graphicImage name="demo/images/dashboard/onehalf.png" styleClass="ml-2" alt="one half" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('cartesian', 'xl:col-8')}" immediate="true" update="@form">
                                2/3 <p:graphicImage name="demo/images/dashboard/twothirds.png" styleClass="ml-2" alt="two thirds" />
                            </p:menuitem>
                            <p:menuitem action="#{dashboardView.onDashboardResize('cartesian', 'xl:col-12')}" immediate="true" update="@form">
                                Full <p:graphicImage name="demo/images/dashboard/full.png" styleClass="ml-2" alt="full" />
                            </p:menuitem>
                        </p:submenu>
                    </p:menu>
                </f:facet>

                <p:chart id="chartline" value="#{chartView.cartesianLinerModel}" style="width: 100%; height: 100%;" />
            </p:panel>
        </p:dashboard>
    </div>

    <div class="card">
        <h5 class="mt-0">Legacy</h5>
        <p:dashboard id="legacy" model="#{dashboardView.legacyModel}" styleClass="legacy">
            <p:ajax event="reorder" listener="#{dashboardView.handleReorder}" />

            <p:panel id="sports" header="Sports" closable="true" toggleable="true">
                <p:ajax event="toggle" listener="#{dashboardView.handleToggle}" />
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <h:outputText value="Sports Content" />
            </p:panel>

            <p:panel id="finance" header="Finance" closable="true" toggleable="true">
                <p:ajax event="toggle" listener="#{dashboardView.handleToggle}" />
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <h:outputText value="Finance Content" />
            </p:panel>

            <p:panel id="lifestyle" header="Lifestyle" closable="true" toggleable="true">
                <p:ajax event="toggle" listener="#{dashboardView.handleToggle}" />
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <h:outputText value="Lifestyle Content" />
            </p:panel>

            <p:panel id="weather" header="Weather" closable="true" toggleable="true">
                <p:ajax event="toggle" listener="#{dashboardView.handleToggle}" />
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <h:outputText value="Weather Content" />
            </p:panel>

            <p:panel id="politics" header="Politics" closable="true" toggleable="true">
                <p:ajax event="toggle" listener="#{dashboardView.handleToggle}" />
                <p:ajax event="close" listener="#{dashboardView.handleClose}" />
                <h:outputText value="Politics Content" />
            </p:panel>
        </p:dashboard>
        <div style="clear: both" />
    </div>
</h:form>