• 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

Organigram

Organigram Tag Documentation

Organigram is a component to display hierarchical organizational structures.

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.
autoScrollToSelection boolean false false Automatically scrolls to the selected node.
leafNodeConnectorHeight int false 10 Height of the connector for leaf nodes in pixels.
selection OrganigramNode false Currently selected node.
style String false Inline style of the component.
styleClass String false Style class of the component.
value OrganigramNode false The root node of the organigram.
var String false Name of the iterator variable used to reference each node in the organigram.
zoom boolean false false Enables zoom functionality.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc
  • CommerceBay GmbH
    • Software Development
      • Ridvan Agar
      • Team JavaEE
        • Faces
          • Thomas Andraschko
        • Backend
          • Marie Louise
      • Team Mobile
        • Android
          • Andy Ruby
        • iOS
          • Stevan Jobs
    • Managed Services
      • Thorsten Schultze
      • Sandra Becker
    • Marketing
      • Social Media
        • Ali Mente
        • Lisa Boehm
      • Press
        • Michael Gmeiner
        • Hans Peter
    • Management
      • Hassan El Manfalouty
Options

Usage


<div class="card">
    <h:form id="form">

        <style>
            .ui-organigram .ui-organigram-node.division {
                background: #93e7ff;
                background: -moz-linear-gradient(top, #93e7ff 0%, #007efc 100%);
                background: -webkit-linear-gradient(top, #93e7ff 0%, #007efc 100%);
                background: linear-gradient(to bottom, #93e7ff 0%, #007efc 100%);
            }

            .ui-organigram .ui-organigram-node.employee {
                background: #88c048;
                background: -moz-linear-gradient(top, #88c048 0%, #69a038 100%);
                background: -webkit-linear-gradient(top, #88c048 0%, #69a038 100%);
                background: linear-gradient(to bottom, #88c048 0%, #69a038 100%);
            }
        </style>

        <p:growl id="growl"/>

        <p:organigram id="organigram"
                      widgetVar="organigram"
                      value="#{organigramView.rootNode}"
                      var="node"
                      leafNodeConnectorHeight="#{organigramView.leafNodeConnectorHeight}"
                      autoScrollToSelection="#{organigramView.autoScrollToSelection}"
                      zoom="#{organigramView.zoom}"
                      selection="#{organigramView.selection}"
                      style="#{organigramView.style}">

            <p:ajax event="dragdrop" process="@this" update="@form:growl"
                    listener="#{organigramView.nodeDragDropListener}"/>
            <p:ajax event="select" process="@this" update="@form:growl"
                    listener="#{organigramView.nodeSelectListener}"/>
            <p:ajax event="contextmenu" process="@this"/>
            <p:ajax event="collapse" process="@this" update="@form:growl"
                    listener="#{organigramView.nodeCollapseListener}"/>
            <p:ajax event="expand" process="@this" update="@form:growl"
                    listener="#{organigramView.nodeExpandListener}"/>

            <p:organigramNode>
                <h:outputText value="#{node.data}"/>
            </p:organigramNode>

            <p:organigramNode type="root"
                              style="border-radius: 10px;">
                <h:outputText value="#{node.data}"/>
            </p:organigramNode>

            <p:organigramNode type="division"
                              styleClass="division"
                              icon="pi pi-briefcase"
                              iconPos="left">
                <h:outputText value="#{node.data}"/>
            </p:organigramNode>

            <p:organigramNode type="employee"
                              styleClass="employee"
                              icon="pi pi-user">
                <h:outputText value="#{node.data}"/>
            </p:organigramNode>
        </p:organigram>

        <p:contextMenu for="organigram" nodeType="employee">
            <p:menuitem value="fire employee"
                        update="organigram"
                        icon="pi pi-times"
                        action="#{organigramView.removeEmployee()}"/>
        </p:contextMenu>

        <p:contextMenu for="organigram" nodeType="division">
            <p:menuitem value="Add employee"
                        ajax="false"
                        icon="pi pi-plus"
                        onclick="PF('addEmployeeDialog').show(); return false;"/>
            <p:menuitem value="Remove division"
                        update="organigram @form:growl"
                        icon="pi pi-times"
                        action="#{organigramView.removeDivision()}"/>
        </p:contextMenu>

        <p:dialog id="addEmployeeDialog"
                  widgetVar="addEmployeeDialog"
                  header="Add employee">

            <p:inputText value="#{organigramView.employeeName}"/>

            <p:commandButton process="@parent"
                             update=":form:organigram"
                             value="Add"
                             action="#{organigramView.addEmployee()}"
                             oncomplete="PF('addEmployeeDialog').hide();"/>

        </p:dialog>
    </h:form>

    <h:form>
        <p:panel header="Options" styleClass="mt-5">
            <h:panelGrid columns="2" cellpadding="7">
                <p:outputLabel for="@next" value="zoom" styleClass="text-secondary" />
                <p:selectBooleanCheckbox value="#{organigramView.zoom}">
                    <p:ajax process="@this" update=":form:organigram"/>
                </p:selectBooleanCheckbox>

                <p:outputLabel for="@next" value="autoScrollToSelection" styleClass="text-secondary" />
                <p:selectBooleanCheckbox value="#{organigramView.autoScrollToSelection}">
                    <p:ajax process="@this" update=":form:organigram"/>
                </p:selectBooleanCheckbox>

                <p:outputLabel for="@next" value="leafNodeConnectorHeight" styleClass="text-secondary" />
                <p:inputText value="#{organigramView.leafNodeConnectorHeight}">
                    <p:ajax process="@this" update=":form:organigram"/>
                </p:inputText>

                <p:outputLabel for="@next" value="style" styleClass="text-secondary" />
                <p:inputText value="#{organigramView.style}" size="100">
                    <p:ajax process="@this" update=":form:organigram"/>
                </p:inputText>
            </h:panelGrid>

            <p:commandButton value="Scroll To Selection" onclick="PF('organigram').scrollToSelection(); return false;" styleClass="mt-3 mr-2" />
                <p:commandButton value="Update Organigram" update=":form:organigram" styleClass="mt-3" />
        </p:panel>
    </h:form>
</div>