Web view
Renders a container that displays an external source URL.
Node name : web-view
Attributes
| Attribute | Type | Required | Default value | Description |
|---|---|---|---|---|
| name | string |
false |
Name of the web view. | |
| source | string |
true |
URL | |
| expandable | bool |
false |
true |
Display full screen button. |
| delegated-loading | bool |
false |
true |
When the value of this attribute is true, the url of the web-view is loaded in the context of the owner. |
Warning
If the URL contains &, like http://domain.com/myView?myParam1&myParam2, set the URL in a field and use the field as the source.
Note
When the delegated-loading attribute is set to true, the web-view will be loaded in the context of the owner, so all http headers will be sent to the server.
It's needed when the web-view is used to display a document (e.g : pdf document) or a UI from another cluster which depends on the tenant identifier or application context values.
This can also be a security issue if the web-view is used to display a third-party website.
From 1.21.0, the delegated-loading attribute is set to true by default, if the iframe is used to display a third-party website, it's recommended to set the delegated-loading attribute to false to avoid sending the http headers to the third-party website and avoid CORS issues.
Warning
It is not possible to use delegated-loading to display a multitenant nested cluster inside a webview because only the first HTTP request will forward the tenant.
If you want to display your cluster inside a webview, you'll need to build the URL with the tenant identifier prefix.
Example of building a url in a UI view computed for a multitenant nested cluster with northwind prefix :
string url = string.Empty;
#if PLATFORM_WEB
url = $"{SystemEnvironment.Window.Current.Location.Pathname}/northwind/".Replace("//", "/");
INeosTenantInfo? tenantInfo = ApplicationContext.GetValue<INeosTenantInfo?>("TenantInfo");
if (tenantInfo != null)
{
url = url.Replace($"/{tenantInfo.Identifier}/", "/");
url = $"{url}{tenantInfo.Identifier}/";
}
#endif
return url;
Example
<web-view source="www.google.fr" />
<web-view source="@Fields.Source" />