Skip to content

MindSphere Web Components Widgets for Mendix

Overview

MindSphere Web Components Widgets for Mendix are a set of ready-to-use building blocks (based on the MindSphere Web Components). They can be inserted into custom Mendix applications by using Mendix simple drag and drop functionality. The following components are currently available as a Mendix widgets:

  • Aggregate Chart
  • Aspect Variable Selector
  • Asset Map
  • Asset View
  • Date Time Range Picker
  • Event View
  • File View
  • Map
  • Rule View

The MindSphere Web Components as Mendix Widgets offered by this package are simple wrappers between the MindSphere Web Components, the Mendix Studio Pro and your application. When starting your application, download the MindSphere Web Components into your browser, bind them to your application and apply the configuration given in the Mendix Modeler.

Info

Note that the version of the MindSphere Web Components used in this package may be discontinued in the future. It is recommended to check the availability of the MindSphere Web Components regularly and to prepare an update or a discontinuation of your application.

Get the MindSphere Web Components Widgets

The MindSphere Web Components Widgets can be downloaded directly via the Mendix App Store. To get the MindSphere Web Components Widgets directly imported into your project, we recommend to start the App Store via the Mendix Modeler. After Downloading the Web Components Widgets, they appear in the Toolbox once you open up a Page. starting point

General information about Mendix widgets

For general information about the widget technology within Mendix, refer Widgets on the Mendix web site.

Local Development

Web Components Widgets fetch data on their own from MindSphere by calling the MindSphere APIs. While the Application is running as a registered MindSphere App, this will work without any further user interaction. In order to work locally, a MindSphere API reverse proxy is necessary. The MindSphereSingleSignOn module provides such a reverse proxy and enables it by default.

starting point

Limitations

  • Rule View: Currently it is not possible to delete a rule when running locally using the MindSphere API reverse proxy. The component works fine when the app is deployed and runs in the Cloud.

Widget Usage

General

After importing the MindSphere Web Components Widgets into your project, you can find them in the Toolbox of your pages.

starting point

By performing drag & drop, you can easily integrate the widgets into your pages. Note that the MindSphere Web Components Widgets need to be in the context of a data container, for example Data view or Data grid to communicate with entities from your Domain Model.

Most MindSphere Web Components Widgets offer the same configuration parameters as the respective MindSphere Web Component. In some cases, not all configuration parameters are available. This document only outlines the differences between the MindSphere Web Components and the configuration of the MindSphere Web Components Widgets provided here.

For details about the parameters refer to the respective components documentation.

Each MindSphere Web Components Widget has at least two configuration tabs. The General tab can be configured for each MindSphere Web Components Widget. In this tab, Mendix specific Error Handling can be configured.

starting point

In addition to the respective MindSphere Web Components parameters, the following fields are provided:

  • Component error text: Specifies a string variable for storing error messages from the component (optional).
  • Error Message Microflow: Specifies a microflow to be triggered in case of an error inside the component (optional).
  • Refresh (not available in all MindSphere Web Components Widgets): Specifies a boolean variable which triggers a refresh of the component if set to true. After refreshing the MindSphere Web Components Widget resets the variable to false to prepare the next refresh event.

Widget Specifics

Aggregate Chart

starting point

In addition to the original Aggregate Chart component’s parameters, the following fields are provided:

  • VariablePath configuration: Switch between a static or a dynamic variablePath. The variable is defined in the respective field below.
  • Dynamic variablePath: Specifies a string variable containing the variablePath configuration. This variable can be shared with an Aspect Variable Selector. Otherwise, use the syntax described in the original Aggregate Chart component’s documentation.
  • Static variablePath: Defines a fixed variable path configuration in JSON array format. For details, refer to the original Aggregate Chart component’s documentation.

In the Appearance tab, you can specify the width and height of the MindSphere Web Components Widget.

The following parameters must be specified:

  • From
  • To
  • Dynamic variablePath (to set the value from 'variablePath configuration' to 'dynamic')
  • Static variablePath (to set the value from 'variablePath configuration' to 'static')

starting point

Aspect Variable Selector

starting point

In addition to the original Aspect Variable Selector component's parameters, the following field is provided:

  • Variable path: Specifies a string variable, where the selected Aspects/Variables will be stored in a JSON format.

Note that the standard string variable’s length of 200 is reached very soon. It is recommended to use a string without length limitation.

The following parameter must be specified:

  • Selected Asset Ids

starting point

Asset Map

starting point

In addition to the original Asset Map component's parameters, the following field is provided:

  • Microflow: Specifies a micro flow which is triggered when the user selects one of the assets.
  • Show Shared Assets: If this is true, assets shared by other tenants will also be shown.
  • IsSharedAssets: Specifies if the selected asset is shared or not. This data is saved in the given boolean entity.

The following parameter must be specified:

  • SelectedAssetId

Asset View

starting point

In addition to the original Asset View component's parameters, the following fields are provided:

  • Microflow: Specifies a mircroflow which is triggered when the user selects one of the assets.
  • Dynamic View Mode: Specifies a string variable which contains one of the values List, Card or Tree. If no valid string is specified, the MindSphere Web Components Widget is set to List mode.
  • Show Shared Assets: If this is true, assets shared by other tenants will also be shown.
  • IsSharedAssets: Specifies if the selected asset is shared or not. This data is saved in the given boolean entity.

The following parameter must be specified:

  • SelectedAssetId

Event View

starting point

In addition to the original Event View component's parameters, the following fields are provided:

  • Selected event id: Specifies a string variable containing the selected eventIds.
  • Selected event ids: Specifies a string variable containing all selected eventIds.

Note that the standard string variable length of 200 is reached very soon. It is recommended to use a string without length limitation.

The following parameters must be specified:

  • From
  • To
  • AssetId

File View

starting point

In addition to the original File View component's parameters, the following fields are provided:

  • Selected file name: Specifies a string variable containing the selected file name.
  • Selected file names: Specifies a string variable containing all names of the selected files.

Info

Note that the standard string variable length of 200 is reached very soon. It is recommended to use a string without length limitation.

The following parameters must be specified:

  • From
  • To
  • AssetId

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.