Versions Compared

Key

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

...

The functionality of each field in a dialog is provided by a field definition class that allows the editor to perform a task such as enter text, upload an image, select a date etc. Fields are assembled into tabs and tabs into dialogs.

...

<dialog-name>

required

Arbitrary node name. Typically matches the template it edits. For example the component definition node and dialog definition node for a link component could both be named link. This is not required and one dialog can be used for more than one template.

form

required

Contains a form definition, which defines the fields where content is entered.

actions

required

Contains action definitions which define how the data is submitted. The actions are rendered to users as buttons. Typically you need at least save and cancel actions.

modalityLevel

optional

Modality level defines how intrusive the dialog is. Valid values are strong (default), light and non-modal.

actionArea

optional

Allows you to configure secondary actions.

wide

optional, default is false

true opens the dialog in wide mode using all available horizontal space.

Click the expand/collapse button in the top right corner to toggle between the wide and normal (720px) modes.

label

optional

A property that sets the dialog's caption.

The value is ignored if the dialogLabelItemProperty property is set (see below).

The value can be literal such as Group or retrieved from the message bundle with a key such as security-app.group.label.

dialogLabelItemProperty

optional

Allows you to set the dialog's caption dynamically through a property holding the preferred value for the caption, for example through the jcrName property.

If no dialogLabelItemProperty is configured for the dialog, Magnolia tries to retrieve the caption from the label property (see above) or from the respective i18n key in the language bundle associated with the dialog.

The jcrName property is implemented as the value of dialogLabelItemProperty, for instance, in the Security app's user, role and group dialogs (group dialog shown below):

...

The actionArea node lets you provide additional actions and specify a renderer, if required. You need a renderer when the action requires more than just a button (for instance for an upload action).

The choose dialog in the Assets app - 5 UI is an example. The dialog allows editors to upload assets to the DAM while working in other apps.

The configuration is in /modules/dam-app/apps/assets/chooseDialog :

Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node name

Mgnl n
chooseDialog


Mgnl n
actions


Mgnl n
commit


Mgnl n
cancel


Mgnl n
upload


Mgnl n
uploadAndEdit


Mgnl n
actionArea


Mgnl n
secondaryActions


Mgnl n
upload


Mgnl n
uploadAndEdit


Mgnl n
actionRenderers


Mgnl n
upload


Mgnl p
rendererClass

info.magnolia.dam.app.assets.field.UploadAssetActionRenderer

Mgnl n
uploadAndEdit


Mgnl p
rendererClass

info.magnolia.dam.app.assets.field.UploadAndEditActionRenderer

...

Magnolia provides mechanisms to reuse dialogs or more general said to reuse configuration items. See Reusing configuration and Generic tab for a dialog.