Skip to content

Commit 67f514f

Browse files
authored
Merge pull request #9515 from ester-nl/appext/1055-add-warning-name-validation
Warning for invalid name
2 parents 374a1fc + 2388c67 commit 67f514f

File tree

37 files changed

+49
-3770
lines changed

37 files changed

+49
-3770
lines changed

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/web/get-started.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ weight: 2
99

1010
Studio Pro extensions can be developed using typescript and use standard web development technologies to extend the Studio Pro development environment. This guide shows you how to set up a basic development environment for building an extension using the web extensibility API.
1111

12+
For more information see the [Mendix Studio Pro Web Extensibility API](http://apidocs.rnd.mendix.com/10/extensions-api/index.html).
13+
1214
### Prerequisites
1315

1416
You will need the following prerequisites:
@@ -97,17 +99,21 @@ To test the extension, do the following in File Explorer.
9799

98100
1. Start Studio Pro with the following command line parameters to tell it to use the extensions in the folder.
99101

100-
`--enable-extension-development --enable-webview-debugging`
102+
`--enable-extension-development --webview-remote-debugging`
101103

102104
These flags instruct Studio Pro to do the following:
103105

104-
* Load extensions from the webextensions folder
106+
* Load extensions from the `webextensions` folder
105107
* Enable web debugging tools which will be useful when developing your extension
106108

107109
1. In Studio Pro, open the new app.
108110

109111
You will see a new `Extensions` item in the top menu.
110112

113+
{{% alert color="warning" %}}
114+
Extension names used in place of `myextension` must only contain digits, letters, dashes, and underscores. Extensions with an invalid name will not be loaded and will display an error.
115+
{{% /alert %}}
116+
111117
## Conclusion
112118

113119
Using this guide we have:

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/web/web-extensions-howtos/menu-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In this section, you will add a simple menu to your extension.
1919

2020
The code below will:
2121

22-
* create a menu item under the menu that was added in [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-10/getting-started/)
22+
* create a menu item with the caption "My First Menu"
2323
* show a dialog when the menu is clicked
2424

2525
Replace your `src/main/index.ts` file with the following:

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-howtos/create-modal-web-view.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ To open static pages, you need to source them from either a file system path or
8888
namespace MyCompany.MyProject.MendixExtension;
8989

9090
[Export(typeof(WebServerExtension))]
91+
[method: ImportingConstructor]
9192
class ContentServer : WebServerExtension
9293
{
9394
private const string Content = """

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-reference-guide/web-view.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,25 @@ For serving content to the web view and communicating both ways with it, see [Bu
4444
{{% alert color="warning" %}}
4545
{{% snippet file="/static/_includes/apidocs-mxsdk/warning-wwwroot.md" %}}
4646
{{% /alert %}}
47+
48+
## Troubleshooting
49+
50+
### Web Content Fails to Load
51+
52+
If your pane or tab was open when Studio Pro was closed, your web content might fail to load when you reopen Studio Pro. This is because the `WebServerBaseUrl` property is null due to timing issues in the startup sequence.
53+
54+
To resolve this, listen to `OnWebServerBaseUrlChanged` in your `WebServerExtension`. This will get the URL when it gets re-initialized.
55+
56+
You can use the following code:
57+
58+
```csharp
59+
[Export(typeof(WebServerExtension))]
60+
class ContentServer : WebServerExtension
61+
{
62+
[ImportingConstructor]
63+
public ContentServer(INotificationPopupService notificationPopupService)
64+
{
65+
OnWebServerBaseUrlChanged += () => notificationPopupService.ShowNotification("Web Server Base Url Initialized", WebServerBaseUrl.ToString(), null, 2);
66+
}
67+
}
68+
```

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ weight: 20
1515

1616
Extensions can be written in Typescript or other web languages, described here, or using a C# API which is documented separately in [Extensibility API for C# Developers](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/).
1717

18+
{{% alert color="info" %}}
19+
Please note that extension development is only possible by starting Studio Pro with the `--enable-extension-development` feature flag.
20+
{{% /alert %}}
21+
1822
## Prerequisites
1923

2024
* You need at least a basic understanding of the Mendix platform.

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ weight: 2
99

1010
Studio Pro extensions can be developed using typescript and use standard web development technologies to extend the Studio Pro development environment. This guide shows you how to set up a basic development environment for building an extension using the web extensibility API.
1111

12+
For more information, see the [Mendix Studio Pro Web Extensibility API](http://apidocs.rnd.mendix.com/11/extensions-api/index.html).
13+
1214
### Prerequisites
1315

1416
You will need the following prerequisites:
@@ -22,6 +24,10 @@ You will need the following prerequisites:
2224
Extensions can be built on any operating system as the underlying framework is cross-platform.
2325
{{% /alert %}}
2426

27+
{{% alert color="info" %}}
28+
Please note that extension development is only possible by starting Studio Pro with the `--enable-extension-development` feature flag.
29+
{{% /alert %}}
30+
2531
## Creating Your First Extension
2632

2733
This section will show you how to build and test an extension.
@@ -97,7 +103,7 @@ To test the extension, do the following in File Explorer.
97103

98104
1. Start Studio Pro with the following command line parameters to tell it to use the extensions in the folder.
99105

100-
`--enable-extension-development --enable-webview-debugging`
106+
`--enable-extension-development --webview-remote-debugging`
101107

102108
These flags instruct Studio Pro to do the following:
103109

@@ -108,6 +114,10 @@ To test the extension, do the following in File Explorer.
108114

109115
You will see a new `Extensions` item in the top menu.
110116

117+
{{% alert color="warning" %}}
118+
Extension names used in place of `myextension` must only contain digits, letters, dashes, and underscores. Extensions with an invalid name will not be loaded and will display an error.
119+
{{% /alert %}}
120+
111121
## Conclusion
112122

113123
Using this guide we have:

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/menu-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In this section, you will add a simple menu to your extension.
1919

2020
The code below will:
2121

22-
* create a menu item under the menu that was added in [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/)
22+
* create a menu item with the caption "My First Menu"
2323
* show a dialog when the menu is clicked
2424

2525
Replace your `src/main/index.ts` file with the following:

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-9/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "APIs for Studio Pro 9"
33
url: /apidocs-mxsdk/apidocs/apis-for-studio-pro-9/
44
no_list: false
55
description_list: true
6-
description: "Provides the documentation of APIs for Studio Pro 9, including Extensibility API and Mendix Runtime API."
6+
description: "Provides the documentation of APIs for Studio Pro 9, such as Mendix Runtime API."
77
weight: 7
88
linktitle: "Studio Pro 9"
99
---

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

Lines changed: 0 additions & 25 deletions
This file was deleted.

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-9/extensibility-api/csharp/_index.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)