Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
_What is a workbench
_What is a workbench

Workbench definition

Here is an example workbench definition from the Contacts app. This workbench operates on the contacts workspace and displays contacts and folders.

Localtab Group
Localtab
activetrue
titleYAML
Code Block
languagejs
workbench:
  dropConstraintClass: info.magnolia.ui.workbench.tree.drop.AlwaysTrueDropConstraint
  editable: false
  contentViews:
  contentTools:

Localtab
titleJCR node
Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
browser


Mgnl n
workbench


Mgnl n
contentViews


Mgnl n
thumbnail


Mgnl n
search


Mgnl p
dropConstraintClass

info.magnolia.contacts.app.main.tree.ContactDropConstraint

Mgnl p
editable

false

Mgnl n
contentTools


Properties:

contentViews

required

Defines how users can view content in the workbench. The parent node for the specific content view definitions. It must contain at least one content view, see Content view definition.

dragAndDrop

optional , default is true

Set to false to disable drag and drop operations in the workbench.

dropConstraintClass

optional , default is AlwaysTrueDropConstraint

A drag-and-drop constraint class. By restricting the nodes that a user can move you can enforce a certain node hierarchy. For example, you might want to allow content to be moved under folders but not folders under content. If the class is not defined, the  AlwaysTrueDropConstraint is set as default. When you write your own class, implement the  

Javadoc
0info.magnolia.ui.workbench.tree.drop.DropConstraint
 interface.

editable

optional

Makes the workbench editable inline. You can double-click a cell to edit its value. Works only for columns which are also configured as editable.

Inline editing is available only in the tree view, not in list, thumbnail or search views.

Definining a default action will override inline editing. Double-clicking the cell with trigger the default action instead of inline edit mode.

contentTools

optional

A list of configured content tools. (A content tool must be configured with

Javadoc
0info.magnolia.ui.workbench.contenttool.ContentToolDefinition
.)
Javadoc
0info.magnolia.ui.workbench.WorkbenchPresenter
is implemented in a way that it automatically configures a "search box" if you have both list and search view defined.