Skip to content

Commit a812b86

Browse files
Merge remote-tracking branch 'upstream/development' into development
2 parents 6c51f3e + 7cf71f9 commit a812b86

74 files changed

Lines changed: 1904 additions & 790 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

branch-cleanup-timestamp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Last scan for stale merged branches: 2026-03-01 23:28:32 CET (UTC+01:00)
1+
Last scan for stale merged branches: 2026-04-02 00:41:32 CEST (UTC+02:00)

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,6 @@ Below is a list of how-tos for you to begin with:
5151
* [How to Exchange Information Between Active Views](/apidocs-mxsdk/apidocs/web-extensibility-api-11/message-passing-api/)
5252
* [How to Show Version Control Information](/apidocs-mxsdk/apidocs/web-extensibility-api-11/version-control-api/)
5353
* [How to Introduce a New Document Type](/apidocs-mxsdk/apidocs/web-extensibility-api-11/custom-blob-document-api/)
54+
* [How to Listen for Connection Changes](/apidocs-mxsdk/apidocs/web-extensibility-api-11/runtime-controller-api/)
55+
* [How to Access Runtime Constants](/apidocs-mxsdk/apidocs/web-extensibility-api-11/runtime-configuration-api/)
56+
* [How to Use Extension Permissions in Overview Pane](/apidocs-mxsdk/apidocs/web-extensibility-api-11/extension-permissions/)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: "Extension Permissions in Overview Pane"
3+
linktitle: "Extension Permissions"
4+
url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/extension-permissions/
5+
---
6+
7+
## Introduction
8+
9+
This how-to describes how the permission system works for web extensions in Studio Pro. Permissions allow extensions to request access to sensitive APIs or data that require explicit user consent.
10+
11+
{{% alert color="info" %}}
12+
Extension permissions were introduced in version 11.9.0.
13+
{{% /alert %}}
14+
15+
## How Permissions Work
16+
17+
Web extensions can request permissions to access sensitive functionality. The permission system follows these principles:
18+
19+
* **Opt-in by default** — Extensions cannot access protected APIs unless you request persmission and the extension user grants it
20+
* **User control** — You decide which permissions to grant through the Extensions Overview pane in Studio Pro
21+
* **Per-project settings** — Permission grants are stored per project, so a user’s approval for an extension applies only within that app. This gives them the flexibility to grant a permission in one project and choose different settings for the same extension in another.
22+
23+
## Requesting Permissions
24+
25+
To request a permission, declare it in your extension's `package.json` file under the `mendix.permissions` object:
26+
27+
```json
28+
{
29+
"mendixComponent": {
30+
"entryPoints": {
31+
"main": "main.js",
32+
"ui": {
33+
"tab": "tab.js"
34+
}
35+
},
36+
"permissions": {
37+
"runtime-configuration-private": true
38+
}
39+
}
40+
}
41+
```
42+
43+
Setting a permission to **true** indicates that your extension requests this permission. The user must grant it before your extension can use the protected functionality. Default: *False*
44+
45+
## Granting Permissions (User Flow)
46+
47+
When a user installs an extension that requests permissions, they can manage those permissions through the Extensions Overview pane. Follow the steps below:
48+
49+
1. Open Studio Pro and load an app with the extension installed.
50+
2. Go to **View** > **Extensions Overview** to open the Extensions Overview pane.
51+
3. Find the extension in the list. Under the extension details, the **Permissions** section displays the requested permissions.
52+
4. Check or uncheck the checkbox next to each permission to grant or revoke access.
53+
54+
## Available Permissions
55+
56+
The following permissions are available for web extensions:
57+
58+
| Permission | Description |
59+
|------------|-------------|
60+
| `runtime-configuration-private` | Allows the extension to access the values of private constants from the active runtime configuration. Without this permission, private constants are returned with `isPrivate: true` and no value. |
61+
62+
## Extensibility Feedback
63+
64+
If you would like to provide additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
65+
66+
Any feedback is appreciated.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
title: "Access Runtime Constants Using Web API"
3+
linktitle: "Runtime Constants"
4+
url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/runtime-configuration-api/
5+
---
6+
7+
## Introduction
8+
9+
This how-to describes how to create a simple menu that retrieves and displays the runtime constants from the active configuration in a message box.
10+
11+
{{% alert color="info" %}}
12+
Access to runtime constants using the web API was introduced in version 11.9.0.
13+
{{% /alert %}}
14+
15+
## Prerequisites
16+
17+
Before starting this how-to, make sure you have completed the following prerequisites:
18+
19+
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one.
20+
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/) and message boxes as described in [Show a Message Box Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/messagebox-api/).
21+
22+
## Set Up the Extension Structure
23+
24+
Set up the extension structure by following the steps below:
25+
26+
1. Create a menu that will display the runtime constants in the `loaded` method in the main entry point (`src/main/index.ts`). This can be done by following the steps in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
27+
2. Replace the contents of your `src/main/index.ts` file with the following:
28+
29+
```typescript
30+
import { IComponent, Menu, getStudioProApi } from "@mendix/extensions-api";
31+
32+
export const component: IComponent = {
33+
async loaded(componentContext) {
34+
const studioPro = getStudioProApi(componentContext);
35+
const menuApi = studioPro.ui.extensionsMenu;
36+
const runtimeConfigApi = studioPro.runtime.configuration;
37+
const messageBoxApi = studioPro.ui.messageBoxes;
38+
39+
const menuId = "show-constants-menu";
40+
const caption = "Show Runtime Constants";
41+
42+
// Get and show the constants when the menu item is clicked
43+
const action = async () => {
44+
const constants = await runtimeConfigApi.getConstants();
45+
46+
if (constants.length === 0) {
47+
await messageBoxApi.show("info", "No constants found in the active configuration.");
48+
return;
49+
}
50+
51+
const accessibleConstants = constants.filter(c => c.isPrivate === false);
52+
const privateConstants = constants.filter(c => c.isPrivate === true);
53+
54+
let message = "";
55+
56+
if (accessibleConstants.length > 0) {
57+
message += "Accessible Constants:\n";
58+
message += accessibleConstants.map(c => ` ${c.constantName}: ${c.value}`).join("\n");
59+
}
60+
61+
if (privateConstants.length > 0) {
62+
message += `\n\n${privateConstants.length} private constant(s) not accessible.`;
63+
}
64+
65+
await messageBoxApi.show("info", `Runtime Constants:\n\n${message}`);
66+
};
67+
68+
const menu: Menu = { caption, menuId, action };
69+
70+
await menuApi.add(menu);
71+
}
72+
};
73+
```
74+
75+
In this example, you create one menu item that will show a message box with the runtime constants from the active configuration.
76+
77+
The code uses the:
78+
79+
* `menuApi` from `studioPro.ui.extensionsMenu` to allow you to use the menu API
80+
* `messageBoxApi` from `studioPro.ui.messageBoxes` to show a dialog
81+
* `runtimeConfigApi` from studioPro.runtime.configuration to retrieve the runtime constants
82+
83+
{{% alert color="info" %}} The function is `async` in order for you to use `await` when executing the preview action.
84+
{{% /alert %}}
85+
86+
The `getConstants()` function returns an array of constant objects, each with the following properties:
87+
88+
* `isPrivate` – a boolean indicating whether the constant value is hidden (true) or accessible (false)
89+
* `constantName` – the fully qualified name of the constant (for example, `MyModule.MyConstant`)
90+
* `value` – the constant value as a string (only present when `isPrivate` is false)
91+
92+
## Accessing Private Constants
93+
94+
By default, private constants are not accessible and will have `isPrivate` set to true with no value. To access private constant values, your extension must request the `runtime-configuration-private` permission.
95+
96+
Add the permission to your extension's `package.json` after the entry points:
97+
98+
```json
99+
{
100+
"mendixComponent": {
101+
"entryPoints": {
102+
"main": "main.js",
103+
"ui": {
104+
"tab": "tab.js"
105+
}
106+
},
107+
"permissions": {
108+
"runtime-configuration-private": true
109+
}
110+
}
111+
}
112+
113+
```
114+
115+
You have to set the permission to true if you want the permission to appear in the Extensions Overview pane.
116+
117+
When a user installs your extension, they can grant this permission through the Extensions Overview pane (**View** > **Extensions**) in Studio Pro. Once granted, private constants will be returned with `isPrivate` set to false and their value included.
118+
119+
You can read more about permissions in [Extension Permissions in Overview Pane](/apidocs-mxsdk/apidocs/web-extensibility-api-11/extension-permissions/).
120+
121+
## Extensibility Feedback
122+
123+
If you would like to provide additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
124+
125+
Any feedback is appreciated.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: "Listen for Connection Changes"
3+
linktitle: "Runtime Controller"
4+
url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/runtime-controller-api/
5+
---
6+
7+
## Introduction
8+
9+
This how-to describes how to create a simple menu that displays when the connection changed in a message box.
10+
11+
{{% alert color="info" %}}
12+
Listening for connection changes was introduced in version 11.9.0.
13+
{{% /alert %}}
14+
15+
## Prerequisites
16+
17+
Before starting this how-to, make sure you have completed the following prerequisites:
18+
19+
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one.
20+
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/) and message boxes as described in [Show a Message Box Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/messagebox-api/).
21+
* Your app must be running locally in Studio Pro to use the Runtime Controller API.
22+
23+
## Listening for Connection Changes
24+
25+
You can listen for runtime connection state changes to know when the app starts or stops running. To do this, follow the steps below:
26+
27+
1. Add an event listener to respond when the connection state changes.
28+
2. Replace the content of your `src/main/index.ts` file with the following:
29+
30+
```typescript
31+
import { IComponent, getStudioProApi } from "@mendix/extensions-api";
32+
33+
export const component: IComponent = {
34+
async loaded(componentContext) {
35+
const studioPro = getStudioProApi(componentContext);
36+
const runtimeControllerApi = studioPro.runtime.controller;
37+
const messageBoxApi = studioPro.ui.messageBoxes;
38+
39+
// Listen for connection state changes
40+
runtimeControllerApi.addEventListener("connectionChanged", (args) => {
41+
messageBoxApi.show(
42+
"info",
43+
`Runtime connection: ${args.isConnected ? "Connected" : "Disconnected"}`
44+
);
45+
});
46+
}
47+
};
48+
```
49+
50+
The code uses the:
51+
52+
* `menuApi` from `studioPro.ui.extensionsMenu` to allow you to use the menu API
53+
* `messageBoxApi` from `studioPro.ui.messageBoxes` to show a dialog
54+
* `runtimeControllerApi` from `studioPro.runtime.controller` to check if the connection changed.
55+
56+
{{% alert color="info" %}} The function is `async` in order for you to use `await` when executing the preview action.
57+
{{% /alert %}}
58+
59+
The `connectionChanged` event returns an object with:
60+
61+
* `isConnected` – a boolean indicating whether the runtime is currently connected (true) or disconnected (false)
62+
63+
{{% alert color="info" %}} The event only detects when the runtime connects or disconnects. It cannot be used to determine when the runtime is completely initialized.
64+
{{% /alert %}}
65+
66+
## Extensibility Feedback
67+
68+
If you would like to provide additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
69+
70+
Any feedback is appreciated.
Lines changed: 12 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,26 @@
11
---
22
title: "Docker"
3-
url: /developerportal/deploy/docker-deploy/
3+
url: /developerportal/deploy/docker/
44
weight: 60
5-
description: "Describes how to deploy using a Docker image."
6-
#If moving or renaming this doc file, implement a temporary redirect and let the respective team know they should update the URL in the product. See Mapping to Products for more details.
5+
description: "Describes how to deploy your Mendix app to a Docker environment."
6+
no_list: false
7+
description_list: true
78
---
89

910
## Introduction
1011

11-
Docker is an open source container technology. With Mendix, you can use it for simple deployments, particularly when running local or development versions of your app. However, it lacks some scaling and integration features.
12+
This section describes how to deploy your Mendix app to a Docker environment.
1213

13-
The Docker Buildpack simplifies the creation of Docker images locally, but it falls short in terms of running, managing, and operating them effectively compared to the capabilities offered by Mendix on Kubernetes. Leveraging Mendix on Kubernetes means entrusting the Mendix Operator to automate these essential tasks whenever Kubernetes handles your containers. The following diagram illustrates the disparity between Docker Buildpack and Mendix Operator:
14+
## Docker Deployment Options
1415

15-
{{< figure src="/attachments/deployment/docker-deploy/dockerbuildpack-vs-mxoperator.png" class="no-border" >}}
16+
Mendix offers two options for Docker deployments: Portable App Distribution or the Docker Buildpack.
1617

17-
{{% alert color="info" %}}
18-
Mendix suggests that, if you are planning to deploy to your own cloud platform at scale, a better solution for production apps is to use [Mendix on Kubernetes](/developerportal/deploy/private-cloud/). This provides you with structured and tested solutions for integrating with your own cloud infrastructure using comprehensive, automated, native functions, avoiding the need to create your own processes from scratch.
19-
{{% /alert %}}
18+
### Portable App Distribution
2019

21-
This page explains how to build a Docker image from your Mendix App. Every time you make changes to your app, you must create a new Docker image that can be pushed through the different stages of your application pipeline.
20+
[Portable App Distribution](/developerportal/deploy/portable-app-distribution-deploy/) allows users to generate their portable app with a single MxBuild command. It requires fewer manual steps than the Docker Buildpack, simpler environment configuration, and no `rootfs` preparation. Running Portable App Distribution can take as little as 3-6 minutes (the time may vary based on the application's size and complexity).
2221

23-
This how-to teaches you how to do the following:
22+
### Docker Buildpack
2423

25-
* Build the image
26-
* Push the image to a registry
24+
The Docker Buildpack offers custom `rootfs` configuration, but requires multiple build steps, a more complex setup process, and a longer total build time (at least 14-25 minutes).
2725

28-
## Prerequisites
29-
30-
Before starting these instructions, make sure you have completed the following prerequisites:
31-
32-
* Download the latest version of [Mendix Studio Pro](https://marketplace.mendix.com/link/studiopro/) from the *Mendix Marketplace*
33-
* Install Docker from the [Docker site](https://docs.docker.com/engine/installation/)
34-
* Download the [Mendix Docker Buildpack](https://github.com/mendix/docker-mendix-buildpack)
35-
36-
## Building the Image
37-
38-
To build the Docker image, follow these steps:
39-
40-
1. Install Docker on your computer.
41-
2. Restart the computer to ensure that you have been granted access to Docker.
42-
3. Unzip the buildpack into a location of your choice.
43-
4. Open the **Command Prompt** and navigate to the folder where you unzipped the buildpack.
44-
5. Open your app in Studio Pro and select the menu option **App** > **Show App Directory in Explorer**:
45-
46-
{{< figure src="/attachments/deployment/docker-deploy/create-deployment-package.png" class="no-border" >}}
47-
48-
6. Copy the project folder and all its subfolders to the unzipped docker build folder. The project folder needs to be in the same folder as the Docker file, otherwise Docker cannot access it.
49-
7. Execute the following command:
50-
51-
```bash
52-
docker build --build-arg BUILD_PATH="{relative-mendix-project-location}" -t {image name} .
53-
```
54-
55-
**{relative-mendix-project-location}** is the BUILD_PATH which indicates where the application model is located. It is the directory where your .MPR file is located after you copied the project into the docker build folder. If you do not specify it, it defaults to `./project`.
56-
57-
A successful build will resemble the output shown below:
58-
59-
{{< figure src="/attachments/deployment/docker-deploy/build-image.png" class="no-border" >}}
60-
61-
{{% alert color="info" %}}
62-
You can find much more information and links to relevant Docker documentation in the [Mendix Docker Buildpack](https://github.com/mendix/docker-mendix-buildpack) GitHub repository.
63-
{{% /alert %}}
64-
65-
## Pushing the Image
66-
67-
A new Docker image has been created with the name (`{image name}`) you gave it. You can see the image by using the command `docker images`.
68-
69-
Next, you need to push the image to a registry. This can be a public registry or your own. To push it to your own registry, use the command `docker push {image name}`.
70-
71-
## Read More
72-
73-
* [How to Run a Mendix Docker Image](/developerportal/deploy/run-mendix-docker-image/)
26+
## Documents in This Section

0 commit comments

Comments
 (0)