Summary
When a DYNAMICTEXT widget inside a LISTVIEW is created or modified through mxcli with an attribute binding, mxcli reports success, but the binding does not appear to be persisted correctly.
The resulting page keeps a text template such as:
but the corresponding attribute/template parameter binding is missing.
This leaves an orphaned template placeholder and causes Mendix Studio Pro to throw a System.NullReferenceException when opening/selecting the affected widget in the page editor.
This looks like a validation/persistence issue in mxcli: either the binding should be persisted correctly, or mxcli should reject the unsupported syntax with a clear validation error. It should not silently write a broken model state.
Environment
- Mendix Studio Pro version:
10.23.0
- mxcli version:
nightly (2026-06-07T12:42:15Z)
- Context: mxcli used through OpenCode
- OS:
TODO: add your OS here, e.g. Windows 11 / WSL / Linux / macOS
Steps to reproduce
-
Create or modify a page containing a LISTVIEW.
-
Inside the list item template, add a DYNAMICTEXT widget intended to display an entity attribute, for example:
DYNAMICTEXT txtFirstName (
Attribute: Firstname
)
or equivalently a dynamic text template using content parameters, for example:
DYNAMICTEXT txtFirstName (
Content: '{1}',
ContentParams: [{1} = Firstname]
)
-
Run mxcli validation/check.
-
Run the mxcli command that writes the model.
mxcli exec <script-or-command>
-
Re-describe or inspect the affected page after the write.
-
Observe that the persisted widget no longer contains the attribute/template binding. It only keeps something equivalent to:
DYNAMICTEXT txtFirstName (
Content: '{1}'
)
-
Open the project in Mendix Studio Pro 10.23.0.
-
Open the affected page and select/click the affected Dynamic Text widget.
Expected behavior
mxcli should do one of the following:
-
Correctly persist the attribute binding / template parameter binding for DYNAMICTEXT inside LISTVIEW.
For example, if the input is:
DYNAMICTEXT txtFirstName (
Attribute: Firstname
)
then the generated Mendix model should contain a valid Dynamic Text value bound to Firstname.
-
Or, if this syntax/context is not supported yet, mxcli check or mxcli exec should reject it with a clear validation error.
mxcli should not write a partial text template containing {1} without the corresponding parameter binding.
Actual behavior
mxcli accepts the model and reports success.
However, the generated/persisted model appears to drop the actual attribute/template parameter binding and keeps only the text template placeholder:
without the corresponding parameter binding.
This creates an invalid/orphaned template parameter state. Studio Pro then throws a null reference error when opening/selecting the affected widget.
Observed Studio Pro error:
System.NullReferenceException
at ClientTemplateFormPart.CollectControls
Impact
This is high impact because mxcli silently writes a model state that Studio Pro cannot handle correctly.
The failure is difficult to diagnose because:
mxcli check passes or does not report the missing binding.
mxcli exec reports success.
- The error only appears later in Studio Pro.
- The model looks superficially valid because
Content: '{1}' is still present.
- Studio Pro appears to cache the broken model state until fully closed and reopened.
Workaround
Replacing affected DYNAMICTEXT widgets with plain static text avoids the crash:
DYNAMICTEXT txtFirstName (
Content: 'Employee Record'
)
After replacing the affected widgets with plain static Content: values and fully closing/reopening Studio Pro, the NullReferenceException no longer occurs.
The downside is that list items show placeholder/static text instead of data-bound values, so the bindings have to be restored manually in Studio Pro's page editor.
Related issue
This may be related to the same class of issue as #547, where template parameters were silently dropped during round-trip. This report concerns DYNAMICTEXT inside LISTVIEW.
Suggested acceptance criteria
DYNAMICTEXT inside LISTVIEW round-trips losslessly when using attribute/template parameter bindings.
Content: '{1}' is never persisted without the corresponding parameter binding.
mxcli check detects orphaned template placeholders such as {1} with no parameter binding.
- If
Attribute: or ContentParams: is unsupported for this widget/context, mxcli rejects it with a clear validation error instead of writing a broken model.
- Opening/selecting the affected widget in Studio Pro 10.23.0 no longer causes
System.NullReferenceException.
Additional notes
I am reporting this as a user of mxcli through OpenCode, not as someone who has inspected the mxcli internals. The observed behavior strongly suggests that the binding is dropped during mxcli validation/persistence/round-trip, but I may not have identified the exact internal root cause.
Summary
When a
DYNAMICTEXTwidget inside aLISTVIEWis created or modified through mxcli with an attribute binding, mxcli reports success, but the binding does not appear to be persisted correctly.The resulting page keeps a text template such as:
but the corresponding attribute/template parameter binding is missing.
This leaves an orphaned template placeholder and causes Mendix Studio Pro to throw a
System.NullReferenceExceptionwhen opening/selecting the affected widget in the page editor.This looks like a validation/persistence issue in mxcli: either the binding should be persisted correctly, or mxcli should reject the unsupported syntax with a clear validation error. It should not silently write a broken model state.
Environment
10.23.0nightly (2026-06-07T12:42:15Z)TODO: add your OS here, e.g. Windows 11 / WSL / Linux / macOSSteps to reproduce
Create or modify a page containing a
LISTVIEW.Inside the list item template, add a
DYNAMICTEXTwidget intended to display an entity attribute, for example:or equivalently a dynamic text template using content parameters, for example:
Run mxcli validation/check.
Run the mxcli command that writes the model.
Re-describe or inspect the affected page after the write.
Observe that the persisted widget no longer contains the attribute/template binding. It only keeps something equivalent to:
Open the project in Mendix Studio Pro 10.23.0.
Open the affected page and select/click the affected Dynamic Text widget.
Expected behavior
mxcli should do one of the following:
Correctly persist the attribute binding / template parameter binding for
DYNAMICTEXTinsideLISTVIEW.For example, if the input is:
then the generated Mendix model should contain a valid Dynamic Text value bound to
Firstname.Or, if this syntax/context is not supported yet,
mxcli checkormxcli execshould reject it with a clear validation error.mxcli should not write a partial text template containing
{1}without the corresponding parameter binding.Actual behavior
mxcli accepts the model and reports success.
However, the generated/persisted model appears to drop the actual attribute/template parameter binding and keeps only the text template placeholder:
without the corresponding parameter binding.
This creates an invalid/orphaned template parameter state. Studio Pro then throws a null reference error when opening/selecting the affected widget.
Observed Studio Pro error:
Impact
This is high impact because mxcli silently writes a model state that Studio Pro cannot handle correctly.
The failure is difficult to diagnose because:
mxcli checkpasses or does not report the missing binding.mxcli execreports success.Content: '{1}'is still present.Workaround
Replacing affected
DYNAMICTEXTwidgets with plain static text avoids the crash:After replacing the affected widgets with plain static
Content:values and fully closing/reopening Studio Pro, theNullReferenceExceptionno longer occurs.The downside is that list items show placeholder/static text instead of data-bound values, so the bindings have to be restored manually in Studio Pro's page editor.
Related issue
This may be related to the same class of issue as #547, where template parameters were silently dropped during round-trip. This report concerns
DYNAMICTEXTinsideLISTVIEW.Suggested acceptance criteria
DYNAMICTEXTinsideLISTVIEWround-trips losslessly when using attribute/template parameter bindings.Content: '{1}'is never persisted without the corresponding parameter binding.mxcli checkdetects orphaned template placeholders such as{1}with no parameter binding.Attribute:orContentParams:is unsupported for this widget/context, mxcli rejects it with a clear validation error instead of writing a broken model.System.NullReferenceException.Additional notes
I am reporting this as a user of mxcli through OpenCode, not as someone who has inspected the mxcli internals. The observed behavior strongly suggests that the binding is dropped during mxcli validation/persistence/round-trip, but I may not have identified the exact internal root cause.