Subapp descriptor

A subapp descriptor describes a subapp. A subapp is typically rendered as a tab inside an app. The descriptor defines the classes that read the configuration and implement the subapp.

This subapp descriptor is part of the Magnolia 6 UI framework. The fully qualified class name is info.magnolia.ui.api.app.registry.ConfiguredSubAppDescriptor.

If you work with the Magnolia 5 UI framework, see Subapp descriptor for Magnolia 5 UI instead.

Example descriptor

icon: icon-app
class: info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor
appClass: info.magnolia.ui.framework.app.BaseApp
label: Base App
subApps:
  main:
    subAppClass: info.magnolia.ui.framework.app.BaseSubApp
    class: info.magnolia.ui.api.app.registry.ConfiguredSubAppDescriptor
    label: Base Subapp

Descriptor properties

Property Description

<subapp name>

required

Subapp node name. The internal ID used to reference the subapp (for example, in URL fragments).

     subAppClass

required

Fully qualified name of the class that contains the subapp business logic. The class must implement the SubApp interface.

     class

required, default is info.magnolia.ui.api.app.registry.ConfiguredSubAppDescriptor

Subapp descriptor class that reads the configuration. The class must implement the SubAppDescriptor interface. Use the fully qualified class name.

Another possible value is info.magnolia.ui.contentapp.configuration.ContentSubAppDescriptor.

     datasource

optional

Connects the subapp to a data source. For this to work, you have to use the info.magnolia.ui.contentapp.configuration.ContentSubAppDescriptor class.

If no value is specified, the subapp will inherit the app data source.

     actions

optional

Defines actions in the subapp. Specified actions are rendered as buttons via ActionDefinition.

Only the actions that are defined will be provided.

     closable

optional, default is true

Defines whether the subapp can be closed. When false, no Close icon (X) is displayed.

     icon

optional

CSS class that identifies an icon used for the subapp tab. See How to add SVG icons for apps.

     label

optional

Text or message bundle key displayed on the subapp tab.

The order in which you configure subapps is important. The first subapp is the default subapp and is started first.

Browser descriptor

BrowserDescriptor extends the ContentSubAppDescriptor class. It allows you to view and organize content items in tree, list and thumbnail views.

subApps:
  browser:
    subAppClass: info.magnolia.ui.contentapp.browser.Browser
    class: info.magnolia.ui.contentapp.configuration.BrowserDescriptor

Detail descriptor

DetailDescriptor extends the ContentSubAppDescriptor class. It allows you to create and edit content items in the browser.

subApps:
  detail:
    subAppClass: info.magnolia.ui.contentapp.detail.ContentDetailSubApp
    class: info.magnolia.ui.contentapp.detail.DetailDescriptor

You do not need to define default actions for detail subapps. The default commit action would equate to the following configuration:

commit:
  class: info.magnolia.ui.contentapp.detail.action.SaveDetailSubAppActionDefinition
  browserName: browser

SaveDetailSubAppActionDefinition saves and closes the detail subapp and selects the edited item in the browser. The default value for browserName is browser.

dev days event sign up
dev days event sign up
Feedback