Environment: mxcli upstream main at 95091765 (built from source), Mendix 11.12.2 (mx check from mxbuild 11.12.2). Fresh blank app from mx create-project, macOS.
Summary: alter page / alter snippet cannot set RenderMode on a dynamic text. create page and replace … with { … } both accept RenderMode on a dynamictext, and describe prints it, but set RenderMode = … on <dynamictext> is refused. The message says it is "not a property of this built-in widget". RenderMode is a real property of Forms$DynamicText, not a design property, so the hint to use design properties does not help either.
Steps to reproduce
create entity MyFirstModule.RmRow ( Name: String );
create or replace page MyFirstModule.P_SetRenderMode
(
Title: 'Set RenderMode',
Layout: Atlas_Core.Atlas_Default,
Params: { $Row: MyFirstModule.RmRow }
)
{
dataview dv (datasource: $Row) {
dynamictext title (content: 'Title {1}', contentparams: [{1} = Name], rendermode: H1)
dynamictext body (content: 'Body')
}
}
alter page MyFirstModule.P_SetRenderMode {
set RenderMode = H2 on title;
}
Actual (exit 1; the page keeps RenderMode: H1)
Created entity: MyFirstModule.RmRow
Created page MyFirstModule.P_SetRenderMode
Error: failed to set: failed to set RenderMode on title: property "RenderMode" is not a property of this built-in widget, and not an Atlas design property your theme declares for it — `set` writes its own properties (Caption, Class, Style, DynamicClasses, Visible, Editable, …) and any design property of this widget's type. Run `mxcli show design properties for <widget type>` to see which those are
The same happens with alter snippet … { set RenderMode = H4 on <dynamictext> }.
Expected: Altered page, and describe page shows RenderMode: H2, as it does when the page is created with rendermode: H2 directly.
Cause: setRawWidgetPropertyMut (mdl/backend/pagemutator/mutator.go) has no case for RenderMode, so the statement falls through to the pluggable-widget property setter. The MCP backend's mutator already handles it.
Workaround: replace <widget> with { dynamictext … (RenderMode: H2) }, which rewrites the whole widget.
I have a fix with tests and will open a PR that references this issue.
Environment: mxcli upstream
mainat95091765(built from source), Mendix 11.12.2 (mx checkfrom mxbuild 11.12.2). Fresh blank app frommx create-project, macOS.Summary:
alter page/alter snippetcannot setRenderModeon a dynamic text.create pageandreplace … with { … }both acceptRenderModeon adynamictext, anddescribeprints it, butset RenderMode = … on <dynamictext>is refused. The message says it is "not a property of this built-in widget". RenderMode is a real property ofForms$DynamicText, not a design property, so the hint to use design properties does not help either.Steps to reproduce
Actual (exit 1; the page keeps
RenderMode: H1)The same happens with
alter snippet … { set RenderMode = H4 on <dynamictext> }.Expected:
Altered page, anddescribe pageshowsRenderMode: H2, as it does when the page is created withrendermode: H2directly.Cause:
setRawWidgetPropertyMut(mdl/backend/pagemutator/mutator.go) has no case forRenderMode, so the statement falls through to the pluggable-widget property setter. The MCP backend's mutator already handles it.Workaround:
replace <widget> with { dynamictext … (RenderMode: H2) }, which rewrites the whole widget.I have a fix with tests and will open a PR that references this issue.