How to create a new Web App Control Project
-
In the X4 Designer, right-click in the Projects view and select the entry New from the context menu.
-
Select Web App Control Project.
Alternatively, in the File menu, click New and select Web App Control Project.
-
In the File Creation Wizard dialog, enter a name for the entity.
-
Select Finish.
Web App Control Projects have a predefined and unalterable folder structure that is created automatically when a new Web App Control Project is created.
|
Sources |
After creating a project, this folder contains three files:
Note: The automatically created For example, you can also create a |
|
|
Project-related file that is automatically created when the project is created and named after the project. This file allows you to add a definition of cookie consent if necessary. You can enter any text in the fields or provide information about a third-party service.
|
Note:
You can view all files from a Web App Control Project using the developer tools in the browser without authentication.
Integrating a custom control into a Web App
Prerequisite
You have a Web App Project with at least one Technical Process. For information on creating Web App Projects, see Creating a New Web App Project .
The following sections explain how to connect a Web App Control Project to a Web App Project to use one or more custom controls in the Web App.
How to include a custom control
-
Open the Web App Project and double-click the
<Project>.wacfile.In the HTTP Security Header section, selectSAMEORIGINfrom the X-Frame Options drop-down list. -
In the
Componentsfolder of theDashboard.detailfile, insert the desired properties.
At this point, insert the desired custom controls via the<CustomControl>element and reference the previously created Web App Control Project via the mandatory attributeproject.
You can create additional Detail Components in the Components folder, in which you specify layout properties, for example.
-
In the Web App Control Project, customize the
index.htmlfile in theSourcesfolder and add the desired items. -
Open the Web App in the browser. For information on supported browsers, click here.
In addition, you can define the following attributes for the <CustomControl> element:
|
Attribute |
Description |
|---|---|
|
|
The direction in which the elements flow. The order of the elements corresponds to their declaration. Possible values:
|
|
|
Specifies what should happen when the control is full. Possible values:
|
|
|
Defines if the control is visible.
Possible values:
|
|
Attributes that describe iFrame settings in sandbox mode |
|
|
|
Allows the page to submit forms. Possible values:
|
|
|
Allows the page to open modal dialogs. Possible values:
|
|
|
Allows the page to use the Pointer Lock API, an API that provides input methods based on mouse movement over time. Possible values:
|
|
|
Allows the page to open pop-ups. Possible values:
|
|
|
Allows navigation in the top-level browsing context (referred to as Possible values:
|
Within the <CustomControl> element, you use the <APIAction> element to define the API functions that are to be transferred to the Web App. The mandatory name attribute specifies the name of the action to be called.
You can also define the following attributes for the <APIAction> element:
|
Attribute |
Description |
|---|---|
|
|
Name of the component to navigate to at the end of the action. Possible values: Any string |
|
|
Entering a URL Possible values: Any webservice URL |
|
|
Specifies an external link. Possible values:
|
|
|
Path to the Possible values: String (URI) |