Skip to content

v0.10.0 Phase 2: native vs pluggable DATAGRID dispatch + LEGACYDATAGRID keyword #539

@ako

Description

@ako

Parent: #529 (unified schema registry, revised phasing)
Depends on: #538 (Phase 1 must land first — object-list support is needed for
pluggable DataGrid columns to actually work)
Milestone: v0.10.0

Goal

DATAGRID MDL keyword dispatches to the right widget per Mendix project version
(native Forms\$DataGrid on 9.x-10.x, pluggable
com.mendix.widget.web.datagrid.Datagrid on 11.0+). Add LEGACYDATAGRID for
migrated 11+ projects that still have native widgets.

Acceptance fixture

mdl-examples/doctype-tests/31-pluggable-datagrid-gallery-v010-examples.mdl
already parses; this issue makes its BSON output correct for Mendix 11
(pluggable Datagrid) and ensures the same MDL still produces native BSON on
Mendix 10.x.

Work

1. Dispatch table (small policy data file)

mdl/backend/widget/dispatch.json (or similar) contains keyword mappings:

{
  "keywordMappings": [
    {
      "keyword": "DATAGRID",
      "versions": [
        { "min": "9.0.0", "max": "10.99.99", "kind": "native",
          "type": "Forms\$DataGrid" },
        { "min": "11.0.0", "kind": "pluggable",
          "widgetId": "com.mendix.widget.web.datagrid.Datagrid" }
      ]
    },
    {
      "keyword": "LEGACYDATAGRID",
      "versions": [
        { "min": "9.0.0", "kind": "native",
          "type": "Forms\$DataGrid",
          "deprecatedFrom": "11.0.0" }
      ]
    }
  ]
}

2. Replace hardcoded case \"datagrid\" in cmd_pages_builder_v3.go

Replace the hardcoded native dispatch with a registry lookup: read the project's
Mendix version, look up the dispatch table, route to native builder OR pluggable
engine based on the binding kind.

3. Add LEGACYDATAGRID keyword

Grammar addition. Behaves like DATAGRID but always routes native, with a
deprecation warning emitted by mxcli check on Mendix 11+.

4. DESCRIBE round-trip

Reader should emit LEGACYDATAGRID keyword for pages where Forms\$DataGrid
BSON is encountered on a Mendix 11+ project, and DATAGRID for the pluggable
variant. On Mendix 10.x, both keywords still emit DATAGRID (only one option).

Acceptance criteria

  • Same MDL script with DATAGRID produces native Forms\$DataGrid on
    Mendix 10.24, pluggable com.mendix.widget.web.datagrid.Datagrid on 11.9
  • LEGACYDATAGRID keyword always produces native, with deprecation warning
    on Mendix 11+
  • Migrated 11.9 project with mixed grids round-trips through DESCRIBE: each
    grid emits the keyword matching its actual BSON stack
  • mxcli check --post-migration lists every legacy-stack DATAGRID in the
    project as a migration to-do
  • Acceptance fixture 31-pluggable-datagrid-gallery-v010-examples.mdl
    produces correct pluggable BSON on a Mendix 11 project

Out of scope

  • Auto-converting native DataGrid BSON to pluggable BSON (different runtime,
    different schemas — manual Studio Pro operation)
  • Other dual-stack widgets (LEGACYLISTVIEW, LEGACYDROPDOWN) — those follow the
    same pattern but ship in v0.11+

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions