Start page / Plug-In Development / SiteArchitect Extensions / Interactive Features / Toolbar Items / Functional Overview

Toolbar Items: Functional Overview

Plug-in toolbar items in SiteArchitect.

Toolbar item plug-ins provide one or more button items that will be inserted in SiteArchitect's editorial toolbar area.

When a button is clicked, an associated Java action is executed within the context of the store element associated with the form tab that is currently active in SiteArchitect's editorial (middle) pane. Additionally, button items may implement a toggle-style behavior or add a menu that provides further actions.

Functionality

 

Buttons defined by this plug-in are inserted into the toolbar displayed above the editorial (middle) workspace of the SiteArchitect and work within the context of the FirstSpirit element currently shown in that workspace (e.g. a section whose form is currently displayed).

Access API documentation: JavaClientEditorialToolbarItemsPlugin

Editorial toolbar item plug-ins provide one or more toolbar items that follow different interaction patterns:

  • Executable
    implements a simple, clickable button. On click, its executable method is called.
    Access API documentation: ExecutableToolbarItem
  • Toggleable
    implements a toolbar button that can be toggled on and off (selected and deselected, respectively). Developers can provide different functionality for transitions into selected and deselected states as well as register a listener (e.g. a JavaClient permanent plug-in).
    Access API documentation: ToggleableToolbarItem
  • Executable/Grouping
    implements a clickable button like the Executable Toolbar Item, but also offers a drop-down menu that can be populated with Context Menu Item implementations.
    Access API documentation: ExecutableGroupingToolbarItem

Example Implementation

The Server and SiteArchitect Examples source code package contains example implementations of all three toolbar item kinds introduced in the Functionality section.

  • ExampleJavaClientEditorialToolbarItemsPlugin
    provides three toolbar button items, which are implemented as private sub-classes of this plug-in class:
    • The class ExampleExecutableToolbarItem implements a simple toolbar button with an action that is executed on-click.
    • The class ExampleToggleableToolbarItem implements a toggleable toolbar button which may be switched on and off.
    • The class ExampleExecutableGroupingToolbarItem implements a grouping toolbar button that provides an on-click action and uses context menu items to build a drop-down menu.

Code Example

The Toolbar Items Code Example introduces and documents the implementation workflow and points out general considerations in designing plug-ins which provide button items in the editorial toolbar.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy