protected void encodeScript(FacesContext context, Organigram component) throws IOException {
        WidgetBuilder wb = getWidgetBuilder(context);
        wb.init("Organigram", component)
                .attr("zoom", component.isZoom())
                .attr("leafNodeConnectorHeight", component.getLeafNodeConnectorHeight())
                .attr("autoScrollToSelection", component.isAutoScrollToSelection());

        encodeClientBehaviors(context, component);

        wb.finish();
    }
Checks if the current request is a selection request and
assigns the found {@link OrganigramNode} to the <code>selection</code> value expression.

@param context    The current {@link FacesContext}.
@param component The {@link Organigram} component.
primefaces/src/main/java/org/primefaces/component/organigram/OrganigramRenderer.java