Skip to content

No MDL form binds the Image widget to an image object; dynamicimage fails CE0582 in React apps #1476

Closed
ako/mxcli
#1201

Description

@tgolembiewski

Summary

A React-client app cannot show an image that a user uploaded (a System.Image object) through MDL:

So MDL has no form that shows an uploaded photo on a page in a Mendix 11 React-client app.

Reproduction

Measured with mxcli v0.26.0, Mendix 11.12.1, on a new app (React client, the default):

mdl 1;
create persistent entity MyFirstModule.Photo extends System.Image (
  Caption: String(200)
);
create or modify page MyFirstModule.Photo_View (Title: 'Photo', Layout: Atlas_Core.PopupLayout,
                                               Params: ($Photo: MyFirstModule.Photo)) {
  dataview Photo_View_Form (DataSource: $Photo) {
    image Photo_View_Image ()   -- variant A, B or C below
  }
};
Variant mxcli check mx check
A. image Photo_View_Image () MDL-WIDGET22: names no image [error] "No image selected." at Image 'Photo_View_Image'
B. image Photo_View_Image (ImageType: dynamicImage) passes 0 errors
C. dynamicimage Photo_View_Image (DataSource: database from MyFirstModule.Photo) passes [error] [CE0582] "Widget dynamic image is not supported in React client."

Notes:

  • Variant B is not a dynamic image. dynamicImage is not one of the widget's datasource values, which are image, imageUrl and icon in Image.xml. mxcli accepts and stores the unknown value without a warning, and the build passes. I did not check what it renders, but it cannot be bound to the object either. Rejecting an unknown enumeration value at check time would have saved an agent several attempts.
  • The widget's own definition says the dynamic case exists. imageObject is of type image, which Studio Pro lets you set to a static image or to the image object in context, and defaultImageDynamic is described as "the image that is displayed if no image is uploaded".
  • mxcli syntax page widgets names the three sources MDL supports: a collection image, imageUrl and icon.

What an agent does instead

An agent building a product catalogue with uploaded photos spent about six minutes on variants A to C, then worked around it:

  1. a JavaScript action computes the image's URL with mx.data.getDocumentUrl and mx.data.getImageUrl;
  2. the URL is stored in a new String attribute on the entity;
  3. an image (ImageType: imageUrl, ImageUrl: '{1}', ...) shows it.

That works, but it adds an attribute to the domain model only to carry a URL that depends on the object's change date, and every agent has to rediscover it.

Expected

An MDL form that binds the Image widget's imageObject to the image object in context, for example the data view's object or an association path to a System.Image specialisation. It would also need describe page to print it back, and defaultImageDynamic as the fallback image.

A Studio Pro-authored sample of the dynamic imageObject binding would pin the BSON shape. The legacy dynamicimage fix noted that a blank 11.12.1 app has none, so the sample has to come from a page made in Studio Pro.

Activity

  1. github-actions commented on Oct 13, 2026

    @github-actions

    Issue Triage

    Summary:
    The user reports that MDL cannot bind the Mendix Image widget to an uploaded System.Image object in a React‑client app, and the legacy dynamicimage widget is rejected with error CE0582.

    Checklist of required bug‑report information

    Required info Present? Details
    mxcli version ✅ mxcli v0.26.0 mentioned
    Mendix version ✅ Mendix 11.12.1 (React client)
    Scenario (what was tried) ✅ MDL script with three variants (A‑C) shown
    Expected output ✅ Desired MDL form that binds imageObject to the image in context, plus describe page output and defaultImageDynamic fallback
    Experienced output (errors/wrong result) ✅ Errors listed for each variant (MDL‑WIDGET22, “No image selected”, CE0582)
    AI bug report (session log or mxcli diag --bundle) ❌ Not included

    Missing information
    Please provide the session log or the output of mxcli diag --bundle (or at least the relevant log excerpt) so we can reproduce the environment and see any additional diagnostics.

    Thank you for the detailed report! Once we have the log, we’ll be able to investigate further.


    Automated triage via OpenRouter — workflow source

  2. added a commit that references this issue on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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