Choose dialog - 5 UI

Deprecated

Choose dialog has been deprecated since Magnolia 6.0. It is part of the Magnolia 5 UI framework.

For the updated implementation, see Chooser dialog for _Magnolia 6 UI instead.

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.

image

Choosing items from content apps

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. ContentApp creates a ChooseDialogDefinition programmatically. A WorkbenchFieldDefinition and a ContentConnectorDefinition are instantiated In the ContentApp#openChooseDialog method. Values for the definition classes are cloned from the first subapp of the app.

image

Configuring a choose dialog

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.

image

Property Description

chooseDialog

optional

Choose dialog node.

contentConnector

required

Content connector node.

class

required

Content connector definition class implementing info.magnolia.ui.vaadin.integration.contentconnector.ContentConnectorDefinition.

field

required

Field node.

class

required

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 SelectFieldDefinition or a more complex custom field.

class

required

A choose dialog definition class implementing info.magnolia.ui.dialog.definition.ChooseDialogDefinition.
Its default implementation is 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.

ChooseDialogDefinition extends DialogDefinition. This means you can also configure actions (Select and Cancel by default) and an actionArea (optional).

Configuring a workbench

If you want to configure a custom workbench, use info.magnolia.ui.contentapp.field.WorkbenchFieldDefinition as field.

image

Property Description

chooseDialog

optional

Choose dialog node.

field

required

Field node.

workbench

optional

Extend an existing workbench definition or use any properties from the workbench definition.

extends

optional

Path to extended definition.

xref:/Support/Magnolia-5-UI-documentation/Content-apps-5-UI/App-configuration-5-UI/Image-provider-definition-5-UI.adoc[

imageProvider]

Feedback