You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/frontend/design-properties.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -237,7 +237,7 @@ Here is an example of a **Colorpicker** design property using classes:
237
237
```js
238
238
{
239
239
"name":"Background color",
240
-
"type":"Colorpicker",
240
+
"type":"ColorPicker",
241
241
"description":"Description of Background color Property",
242
242
"options": [
243
243
{
@@ -261,7 +261,7 @@ Here is an example of a **Colorpicker** design property using CSS variables:
261
261
```js
262
262
{
263
263
"name":"Background color",
264
-
"type":"Dropdown",
264
+
"type":"ColorPicker",
265
265
"property":"background-color",
266
266
"description":"Description of Background Color Property",
267
267
"options": [
@@ -281,7 +281,9 @@ Here is an example of a **Colorpicker** design property using CSS variables:
281
281
}
282
282
```
283
283
284
-
Note: if you can not provide a value for the preview, it is recommended to instead use a **Dropdown** design property. If at a later point in time you can provide the preview, you can always change the type from a **Dropdown** to a **Colorpicker**.
284
+
If no preview is specified, the value of the CSS variable will be used by default. Therefore, you can omit the preview property if your design property is based on CSS variables. However, if your design property is based on classes, it is recommended to provide a preview.
285
+
286
+
You can always change the type from a **Colorpicker** to a **Dropdown** if needed.
285
287
286
288
This is how the **Colorpicker** design property appears:
The flag `canExecute` indicates if an action can be run under current conditions. This prevents executing actions that are not allowed by the app's security settings. User roles can be set in the microflows and nanoflows, allowing users to call them. For more information on user roles and security, see the [Module Security Reference Guide](/refguide/module-security/).
62
62
63
63
You can also employ this flag when using a **Call microflow** action triggering a microflow with a parameter. Such an action cannot be run until a parameter object is available, for example when a parent data view has finished loading. Attempting to `execute` an action that cannot be run will have no effect, and generates a debug-level warning message.
64
64
65
65
The exception to this behavior is when the `ActionValue` is returned by [`ListActionValue.get()`](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis-list-values/#listactionvalue). In this case, the flag will be true when not all arguments have been loaded. Calling `execute()` for an action with loading arguments will run the action as soon as all arguments become available. While waiting, `isExecuting` will be set to `true` and subsequent calls to `execute()` are ignored. If any arguments become unavailable after loading, the action will not run and a debug-level warning message will be logged.
66
66
67
-
#### 4.1.2 isExecuting
67
+
#### isExecuting {#isexecuting}
68
68
69
69
The flag `isExecuting` indicates whether an action is currently running. A long-running action can take seconds to complete. Your component might use this information to render an inline loading indicator which lets users track loading progress. Often it is not desirable to allow a user to trigger multiple actions in parallel. Therefore, a component (maybe based on a configuration) can decide to skip triggering an action while a previous execution is still in progress.
70
70
71
71
Note that `isExecuting` indicates only whether the current action is running. It does not indicate whether a target nanoflow, microflow, or object operation is running due to another action.
72
72
73
-
#### 4.1.3 execute
73
+
#### execute {#execute}
74
74
75
75
The method `execute` triggers the action. It returns nothing and does not guarantee that the action will be started synchronously. But when the action does start, the component will receive a new prop with the `isExecuting` flag set.
76
76
77
+
When the action property [defines action variables](/apidocs-mxsdk/apidocs/pluggable-widgets-property-types/#action-xml-elements), the `execute()` method expects an object map containing a property for each variable. The variables may be passed as undefined, but need to be set explicitly.
78
+
79
+
Given an action property that defines two `Decimal` variables `lat` and `long`, and a `String` variable named `label`, its `execute()` method accepts the following input:
`DynamicValue` is used to represent values that can change over time and is used by many property types. It is defined as follows:
@@ -105,7 +121,7 @@ Though the type definition above looks complex, it is fairly simply to use becau
105
121
106
122
### EditableValue {#editable-value}
107
123
108
-
`EditableValue` is used to represent values that can be changed by a pluggable widget client component and is passed only to [attribute properties](/apidocs-mxsdk/apidocs/pluggable-widgets-property-types/#attribute). It is defined as follows:
124
+
`EditableValue` is used to represent values, either an attribute or a variable, that can be changed by a pluggable widget client component and is passed only to [attribute properties](/apidocs-mxsdk/apidocs/pluggable-widgets-property-types/#attribute). It is defined as follows:
@@ -135,15 +151,15 @@ The flag `readOnly` indicates whether a value can actually be edited. It will be
135
151
136
152
The value can be read from the `value` field and modified using `setValue` function. Note that `setValue` returns nothing and does not guarantee that the value is changed synchronously. But when a change is propagated, a component receives a new prop reflecting the change.
137
153
138
-
When setting a value, a new value might not satisfy certain validation rules — for example a value might be bigger that the underlying attribute allows. In this case, your change will affect only `value` and `displayValue` received through a prop. Your change will not be propagated to an object’s attribute and will not be visible outside of your component. The component will also receive a validation error text through the `validation` field of `EditableValue`.
154
+
When setting a value, a new value might not satisfy certain validation rules — for example when an attribute is selected and the new value is bigger than the underlying attribute allows. In this case, your change will affect only `value` and `displayValue` received through a prop. Your change will not be propagated to an object’s attribute and will not be visible outside of your component. The component will also receive a validation error text through the `validation` field of `EditableValue`.
139
155
140
156
It is possible for a component to extend the defined set of validation rules. A new validator — a function that checks a passed value and returns a validation message string if any — can be provided through the `setValidator` function. A component can have only a single custom validator. The Mendix Platform ensures that custom validators are run whenever necessary, for example when a page is being saved by an end-user. It is best practice to call `setValidator` early in a component's lifecycle — specifically in the [componentDidMount](https://en.reactjs.org/docs/react-component.html#componentdidmount) function.
141
157
142
-
In practice, many client components present values as nicely formatted strings which take locale-specific settings into account. To facilitate such cases `EditableValue` exposes a field `displayValue` formatted version of `value`, and a method `setTextValue` — a version of `setValue` that takes care of parsing. `setTextValue` also validates that a passed value can be parsed and assigns the target attribute’s type. Similarly to `setValue`, a change to an invalid value will not be propagated further that the prop itself, but a `validation` is reported. Note that if a value cannot be parsed, the prop will contain only a `displayValue` string and `value` will become undefined.
158
+
In practice, many client components present values as nicely formatted strings which take locale-specific settings into account. To facilitate such cases `EditableValue` exposes a field `displayValue`which is the formatted version of `value`, and a method `setTextValue` — a version of `setValue` that takes care of parsing. `setTextValue` also validates that a passed value can be parsed and assigned to the target's value type. Similarly to `setValue`, a change to an invalid value will not be propagated further than the prop itself, but a `validation` is reported. Note that if a value cannot be parsed, the prop will contain only a `displayValue` string and `value` will become undefined.
143
159
144
160
There is a way to use more the convenient `displayValue` and `setTextValue` while retaining control over the format. A component can use a `setFormatter` method passing a formatter object: an object with `format` and `parse` methods. The Mendix Platform provides a convenient way of creating such objects for simple cases. An existing formatter exposed using a `EditableValue.formatter` field can be modified using its `withConfig` method. For complex cases formatters still can be created manually. A formatter can be reset back to default settings by calling `setFormatter(undefined)`.
145
161
146
-
The optional field `universe` is used to indicate the set of all possible values that can be passed to a `setValue` if a set is limited. Currently, `universe` is provided only when the edited attribute is of the Boolean or enumeration [types](/refguide/attributes/#type).
162
+
The optional field `universe` is used to indicate the set of all possible values that can be passed to a `setValue` if a set is limited. Currently, `universe` is provided only when the edited value is of the Boolean or enumeration [types](/refguide/attributes/#type).
147
163
148
164
### ModifiableValue {#modifiable-value}
149
165
@@ -192,7 +208,7 @@ It is possible for a component to extend the defined set of validation rules. A
192
208
193
209
### IconValue {#icon-value}
194
210
195
-
`DynamicValue<IconValue>` is used to represent icons: small pictograms in the Mendix Platform. Those can be static or dynamic file- or font-based images. An icon can only be configured through an [icon](/apidocs-mxsdk/apidocs/pluggable-widgets-property-types/#attribute) property. `IconValue` is defined as follows:
211
+
`DynamicValue<IconValue>` is used to represent icons: small pictograms in the Mendix Platform. Those can be static or dynamic file- or font-based images. An icon can only be configured through an [icon](/apidocs-mxsdk/apidocs/pluggable-widgets-property-types/#icon) property. `IconValue` is defined as follows:
@@ -477,7 +477,7 @@ If a `dataSource` attribute is not specified, the client will receive an `Action
477
477
478
478
When a `dataSource` attribute is specified and configured by the user, it is passed as a [`ListActionValue`](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis-list-values/#listactionvalue). For more information, see the [Datasource](#datasource) section below.
479
479
480
-
#### XML Attributes
480
+
#### XML Attributes {#xml-attributes}
481
481
482
482
| Attribute | Required | Attribute Type | Description |
@@ -487,6 +487,23 @@ When a `dataSource` attribute is specified and configured by the user, it is pas
487
487
|`defaultValue`| No | String | Default value for the property, the format should be `<ModuleId>.<DocumentId>`|
488
488
|`defaultType`| No | String | Default type for the property, supported values are `None`, `OpenPage`, `CallNanoflow`, `CallMicroflow`|
489
489
490
+
#### XML Elements {#action-xml-elements}
491
+
492
+
`<actionVariables>` — Defines variables a widget provides when calling [execute() on an ActionValue](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis/#execute). The variables are made available in Studio Pro when configuring [Call a Microflow](/refguide/on-click-event/#call-microflow) and [Call a Nanoflow](/refguide/on-click-event/#call-nanoflow) actions.
493
+
494
+
`<actionVariable>` (required one or more) — Represents a primitive value provided by the widget as an argument when calling `ActionValue.execute()`. The variable is defined by the following attributes:
495
+
*`key` (required) — The identifier of the variable used in Studio Pro and the Pluggable Widgets API.
496
+
*`type` (required) — The type of the value that the variable represents. Supported types and their corresponding Typescript type are listed in the table below.
497
+
*`caption` (required) — A short description of the variable that is displayed in Studio Pro.
498
+
499
+
| Action Variable Type | Client Type |
500
+
| -------------------- | --------- |
501
+
|`String`|`string`|
502
+
|`Integer`|`Big`|
503
+
|`Decimal`|`Big`|
504
+
|`DateTime`|`Date`|
505
+
|`Boolean`|`boolean`|
506
+
490
507
#### Studio Pro UI
491
508
492
509
When the property is defined as follows:
@@ -502,6 +519,22 @@ Then the Studio Pro UI for the property appears like this:
The attribute property type allows a widget to work directly with entities' attributes, both reading and writing attributes. Depending on the widget's purposes, a widget should define attribute types it supports.
Copy file name to clipboardExpand all lines: content/en/docs/appstore/create-content/create-connectors/_index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ This chart shows the available solutions for when you want to connect Mendix app
45
45
46
46
| Category | Solution |
47
47
| --- | --- |
48
-
| Platform-supported protocols | Connect to two or more Mendix applications using platform-supported facilities:<br> SOAP web services (see [Published Web Services](/refguide/published-web-services/) and [Consumed Web Services](/refguide/consumed-web-services/)), REST web services (see [Published REST Services](/refguide/published-rest-service/) and [Consumed REST Services](/refguide/consumed-rest-services/)), OData (see [Published OData Services](/refguide/published-odata-services/) and [Consumed OData Services](/refguide/consumed-odata-services/)), or Catalog (see the [Catalog Guide](/catalog/)). |
48
+
| Platform-supported protocols | Connect to two or more Mendix applications using platform-supported facilities:<br> SOAP web services (see [Published Web Services](/refguide/published-web-services/) and [Consumed Web Services](/refguide/consumed-web-services/)), REST web services (see [Published REST Services](/refguide/published-rest-service/) and [Consumed REST Service](/refguide/consumed-rest-service/)), OData (see [Published OData Services](/refguide/published-odata-services/) and [Consumed OData Services](/refguide/consumed-odata-services/)), or Catalog (see the [Catalog Guide](/catalog/)). |
49
49
| Unsupported protocols | Build a module to connect either with alternative protocols or by encapsulating one of the platform supported protocols. You can do this with [Java actions](/refguide/java-actions/) or [JavaScript actions](/refguide/javascript-actions/). |
50
50
51
51
#### Connecting Mendix Apps to Third-Party Systems
0 commit comments