Skip to content

[WTF-2648] Extend pluggable widget API docs for single object datasource#11159

Draft
mlaponder wants to merge 2 commits into
mendix:developmentfrom
mlaponder:wtf/single-object-ds-docs
Draft

[WTF-2648] Extend pluggable widget API docs for single object datasource#11159
mlaponder wants to merge 2 commits into
mendix:developmentfrom
mlaponder:wtf/single-object-ds-docs

Conversation

@mlaponder
Copy link
Copy Markdown
Contributor

In Studio Prop 11.11 support for the single object data source API will be introduced, this PR describes the API on that feature.

| Web | Context, Microflow, Nanoflow, Listen to widget |
| Native | Context, Microflow, Nanoflow |

A single object data source may be linked to [`action`](#action), [`attribute`](#attribute), [`association`](#association), [`expression`](#expression), [`text template`](#texttemplate), and [`widgets`](#widgets) properties using the `dataSource` attribute on those properties. When linked to a single object data source, those properties receive the same types as unlinked properties — there are no list-aware variants:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To emphasize the differences in behavior between the two types of datasource we may consider adding a combined section about Linking Properties to Datasources. That way we can add a single table with both List Client Types and Single Object Client Types.

For example:

Property type List client type Single object client type
action ListActionValue ActionValue
selection SelectionSingleValue or SelectionMultiValue Not supported

##### Data Source Defaults {#data-source-defaults}

{{% alert color="info" %}}
The `defaultType` and `defaultValue` attributes for datasources were introduced in Mendix [10.16](/releasenotes/studio-pro/10.16/).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this callout

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see I forgot to finish #10953

| `defaultType` | No | String | Default type for the property, see [Default Data Sources](#data-source-defaults) |
| `defaultValue` | No | String | Default value for the property, see [Default Data Sources](#data-source-defaults) |

##### Data Source Defaults {#data-source-defaults}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting to see the limitations for Single Object Datasources here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants