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
@@ -382,10 +378,6 @@ You can set a fixed return type for your expression property with one of the sup
382
378
383
379
##### Return Type Assignable to an Attribute
384
380
385
-
{{% alert color="info" %}}
386
-
The `assignableTo` attribute was introduced in Mendix [9.20](/releasenotes/studio-pro/9.20/).
387
-
{{% /alert %}}
388
-
389
381
You can use `assignableTo` to specify that the return type of the expression property should depend on the attribute property with the given property path. This means that the value of the expression will be assignable to the attribute configured for that attribute property (using [`setValue`](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis/#editable-value)).
390
382
391
383
The client component will receive a `DynamicValue<T>` where `T` depends on the possible types of the target attribute. If the attribute property allows for more than one type, the type of the actual value depends on the attribute that has been configured.
@@ -574,14 +566,6 @@ Then the Studio Pro UI for the property appears like this:
574
566
575
567
### Association {#association}
576
568
577
-
{{% alert color="info" %}}
578
-
This property type was introduced in Mendix [9.13](/releasenotes/studio-pro/9.13/).
579
-
{{% /alert %}}
580
-
581
-
{{% alert color="info" %}}
582
-
The ability to link association properties to a data source was introduced in Mendix [9.17](/releasenotes/studio-pro/9.17/).
583
-
{{% /alert %}}
584
-
585
569
The association property type allows a widget to work directly with both reading and writing associations between entities. Depending on the widget's purposes, a widget should define association types it supports.
586
570
587
571
If a `dataSource` attribute is not specified the client will receive a `ReferenceValue` for references (singular references), a `ReferenceSetValue` for reference sets (multiple references), or a union of them. For more information, see the [ModifiableValue](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis/#modifiable-value) section of *Client APIs Available to Pluggable Widgets*.
@@ -710,10 +694,6 @@ Then the Studio Pro UI for the property appears like this:
710
694
711
695
The datasource property allows widgets to work with object lists. The client component will receive value prop of type [`ListValue`](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis-list-values/#listvalue) and may be used with [`action`](#action), [`attribute`](#attribute), [`association`](#association), [`expression`](#expression), [`text template`](#texttemplate), and [`widgets`](#widgets) properties. See [Data Sources](/refguide/data-sources/#list-widgets) for available data source types.
712
696
713
-
{{% alert color="info" %}}
714
-
The ability to link association properties to a data source was introduced in Mendix [9.17](/releasenotes/studio-pro/9.17/).
715
-
{{% /alert %}}
716
-
717
697
If no data source has been configured by the user, any properties that are linked to the datasource property are automatically omitted from the props passed to the client component (even if they are marked as required).
718
698
719
699
{{% alert color="warning" %}}
@@ -722,12 +702,29 @@ Only list datasources are supported, therefore specifying `isList="true"` is req
722
702
723
703
#### XML Attributes
724
704
725
-
| Attribute | Required | Attribute Type | Description |
|`required`| No | Boolean | This decides if the user is required to specify a datasource, `true` by default |
711
+
|`defaultType`| No | String | Default type for the property, supported values are `Database`, `Microflow`, `Nanoflow`, and `Association`|
712
+
|`defaultValue`| No | String | Default value for the property, see [Default Data Sources](#data-source-defaults)|
713
+
714
+
##### Data Source Defaults {#data-source-defaults}
715
+
716
+
{{% alert color="info" %}}
717
+
The `defaultType` and `defaultValue` attributes for datasources were introduced in Mendix [10.16](/releasenotes/studio-pro/10.16/).
718
+
{{% /alert %}}
719
+
720
+
You can use the `defaultType` and `defaultValue` attributes to configure default data sources for your widget. Unless overridden in Studio Pro, the widget will attempt to configure the data source according to its defaults. Both attributes need to be set for the defaults to be applied.
721
+
722
+
The format of `defaultValue` depends on the chosen `defaultType`:
0 commit comments