Problem
DATAGRID, LISTVIEW, and GALLERY widgets fail to parse when their DataSource is an association path expression like \$currentObject/Module.AssociationName. Studio Pro calls this data source type "By Association" — it's a core pattern for master-detail pages.
Reproduction
CREATE PAGE Module.OrderDetail
(
Title: 'Order Details',
Layout: Atlas_Core.Atlas_Default
)
{
DATAVIEW dv (DataSource: Module.Order) {
DATAGRID items (DataSource: \$currentObject/Module.Order_OrderLine) {
...
}
}
};
Parser error at \$currentObject/. The / after \$currentObject isn't accepted.
Root cause
Grammar rules for widget DataSource: expressions accept only a qualifiedName (entity type) or a microflow reference, not an association path starting from a context variable.
Suggested fix
Extend the widget DataSource: grammar to accept association paths. When emitting BSON:
- Currently mxcli emits
ListOperation\$TypeDataSource or similar
- For association paths, emit
ListOperation\$AssociationDataSource (or the equivalent Studio Pro type) with the association ID and the context variable reference
The syntax should mirror how XPath constraints already use \$var/Module.Assoc/... — see .claude/skills/mendix/xpath-constraints.md.
Why it matters
Master-detail pages (most common CRUD pattern) cannot be fully generated from MDL without this. Users have to fall back to Studio Pro to configure the data source type, which defeats the purpose of MDL.
Problem
DATAGRID,LISTVIEW, andGALLERYwidgets fail to parse when theirDataSourceis an association path expression like\$currentObject/Module.AssociationName. Studio Pro calls this data source type "By Association" — it's a core pattern for master-detail pages.Reproduction
Parser error at
\$currentObject/. The/after\$currentObjectisn't accepted.Root cause
Grammar rules for widget
DataSource:expressions accept only aqualifiedName(entity type) or a microflow reference, not an association path starting from a context variable.Suggested fix
Extend the widget
DataSource:grammar to accept association paths. When emitting BSON:ListOperation\$TypeDataSourceor similarListOperation\$AssociationDataSource(or the equivalent Studio Pro type) with the association ID and the context variable referenceThe syntax should mirror how XPath constraints already use
\$var/Module.Assoc/...— see.claude/skills/mendix/xpath-constraints.md.Why it matters
Master-detail pages (most common CRUD pattern) cannot be fully generated from MDL without this. Users have to fall back to Studio Pro to configure the data source type, which defeats the purpose of MDL.