Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.

Page tree
Skip to end of metadata
Go to start of metadata

Dialog actions allow the user to submit or cancel a form in a dialog. Dialog actions have the same action definition properties as all actions but they are usually simpler. You only need the class and label properties.

Here is an example of the save and cancel actions used in the Text and Image component dialog.

Node nameValue

 stkTextImage

 

 actions

 

 commit

 

 class

info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition

 label

save changes

 cancel

 

 class

info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition

 label

cancel

Dialog action classes

Magnolia provides the following action definition classes. They cover typical dialog actions.

Save

Class info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition
DescriptionValidates the input and saves.
Example /modules/pages/dialogs/editPage/actions/commit

Cancel

Classinfo.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition
DescriptionCancels the dialog.
Example/modules/pages/dialogs/editPage/actions/cancel

Save import

Classinfo.magnolia.ui.admincentral.dialog.action.SaveImportDialogActionDefinition
DescriptionSaves an imported file.
Example /modules/ui-admincentral/dialogs/import/actions/commit

Save configuration

Classinfo.magnolia.ui.admincentral.dialog.action.SaveConfigDialogActionDefinition
Description

Saves a dialog used to edit configuration.

ExampleNot used anywhere because configuration nodes are edited inline in the tree by default.

Callback

Classinfo.magnolia.ui.admincentral.dialog.action.SaveConfigDialogActionDefinition
Description

Defines an action for simple callback handling. Can be configured to perform a cancel or success action.

Example/modules/ui-admincentral/dialogs/link/actions/selectCallBack
Properties
  • callSuccess. Call on success. Set value to true or false.
  • successActionName. Name of the success action. Default is success.