Magnolia 5.4 reached end of life on November 15, 2018. This branch is no longer supported, see End-of-life policy.
A choose dialog allows you to select an item from an app, typically from a content app. Below is a choose dialog for choosing a page. The dialog displays the workbench from the Pages app. You typically open a choose dialog by clicking a link field in some other dialog. Configure the choose dialog under the app that manages the items.
A content app already has a suitable view for choosing items: the workbench of the first subapp. You don't need to configure a choose dialog explicitly.
ChooseDialogDefinition
programmatically. A ContentApp#openChooseDialog
method. Values for the definition classes are cloned from the first subapp of the app.You don't need to configure a choose dialog when choosing items from a content app. The workbench of the first subapp works as an item chooser automatically.
You can configure a choose dialog explicitly if required. Create a chooseDialog
node under the app configuration.
Node name | Value |
---|---|
<module name> | |
apps | |
<app name> | |
chooseDialog | |
class | <fully-qualified class name of your ChooseDialogDefinition> |
contentConnector | |
class | <fully-qualified class name of your ContentConnectorDefinition> |
field | |
class | <fully-qualified class name of your FieldDefinition> |
Properties:
class
: A choose dialog definition class implementing info.magnolia.ui.dialog.definition.ChooseDialogDefinition
. info.magnolia.ui.dialog.definition.ConfiguredChooseDialogDefinition
(due to registration magnolia-ui-framework/src/main/resources/META-INF/magnolia/ui-framework.xml). Leave out the class
property to use the default implementation.contentConnector
class
: Content connector definition class implementing info.magnolia.ui.vaadin.integration.contentconnector.ContentConnectorDefinition
.field
:class
: A field used to choose the item, typically a workbench. The value must be a subclass of info.magnolia.ui.form.field.definition.FieldDefinition
. This means it can be many kind of fields, for instance a Note that ChooseDialogDefinition extends DialogDefinition. This means you can also configure actions
(Select and Cancel by default) and an actionArea
(optional).
If you want to configure a custom workbench, use info.magnolia.ui.contentapp.field.WorkbenchFieldDefinition
as field.
Node name | Value |
---|---|
chooseDialog | |
field | |
class | info.magnolia.ui.contentapp.field.WorkbenchFieldDefinition |
workbench | |
extends | ../../../subApps/browser/workbench |
imageProvider |
Properties:
field
class
: info.magnolia.ui.contentapp.field.WorkbenchFieldDefinition
workbench
: Extend an existing workbench definition or use any properties from the workbench definition.imageProvider
: Optional.