Documentation

Dialog

A common dialog definition that may be referenced by other Connect modules and from JavaScript API calls.

For example, take the following dialog module:

{
  "modules": {
    "dialogs": [
      {
        "url": "/my-dialog-content",
        "options": {
          "size": "fullscreen",
          "header": {
            "value": "Example Dialog"
          }
        },
        "key": "dialog-module-key"
      }
    ]
  }
}

This common dialog might be referenced from a web item target, so that triggering the web item launches the dialog:

{
  "target": {
    "type": "dialogmodule",
    "options": {
      "key": "dialog-module-key"
    }
  }
}

The common dialog might also be referenced when creating a Dialog manually with the JavaScript API:


 AP.require('dialog', function(dialog){
   dialog.create({
     key: 'dialog-module-key'
   }).on("close", callbackFunc);
 });
 

Properties

key

Type
string
Required
Yes
Description

A key to identify this module.

This key must be unique relative to the add on, with the exception of Confluence macros: Their keys need to be globally unique.

Keys must only contain alphanumeric characters and dashes.

The key is used to generate the url to your add-on's module. The url is generated as a combination of your add-on key and module key. For example, an add-on which looks like:

{
    "key": "my-addon",
    "modules": {
        "configurePage": {
            "key": "configure-me",
        }
    }
}

Will have a configuration page module with a URL of /plugins/servlet/ac/my-addon/configure-me.

url

Type
string

uri-template
Required
Yes
Description

Specifies the URL of the content displayed in the dialog. The URL can be absolute or relative to either the product URL or the add-on's base URL, depending on the context attribute.

Your add-on can receive additional context from the application by using variable tokens in the URL attribute.

options

Description

An object containing options for this dialog.