Summary
REPLACE widgetName WITH { ... } fails with "widget not found" when the target widget is a FOOTER nested inside a DATAVIEW, even though DESCRIBE PAGE correctly reports the widget by that name.
Environment
- mxcli version: current
- Mendix version: 10.24.15
Steps to Reproduce
-
Page has this structure (confirmed by DESCRIBE PAGE):
DATAVIEW dataView1 (DataSource: $Asset) {
TEXTBOX textBox1 (Label: 'Reason', Attribute: ReasonForChange)
FOOTER footer1 {
ACTIONBUTTON actionButton1 (Caption: 'Save', Action: CALL_MICROFLOW Mod.ACT_Save)
ACTIONBUTTON actionButton2 (Caption: 'Cancel', Action: CANCEL_CHANGES CLOSE_PAGE)
}
}
-
Attempt to replace the footer:
ALTER PAGE Mod.MyPage {
REPLACE footer1 WITH {
FOOTER footer1 {
ACTIONBUTTON btnSave (Caption: 'Save', Action: MICROFLOW Mod.ACT_Save, ButtonStyle: Primary)
ACTIONBUTTON btnCancel (Caption: 'Cancel', Action: CLOSE_PAGE)
}
}
};
-
Result:
Error: failed to REPLACE: widget "footer1" not found
Expected Behaviour
The FOOTER and its children are replaced.
Actual Behaviour
mxcli cannot find footer1 even though DESCRIBE PAGE shows it at that name. The widget appears to be outside the REPLACE traversal scope when nested inside a DataView.
Workaround
Replace individual child buttons instead of the parent FOOTER:
ALTER PAGE Mod.MyPage {
REPLACE actionButton1 WITH {
ACTIONBUTTON btnSave (Caption: 'Save', Action: MICROFLOW Mod.ACT_Save, ButtonStyle: Primary)
};
REPLACE actionButton2 WITH {
ACTIONBUTTON btnCancel (Caption: 'Cancel', Action: CLOSE_PAGE)
}
};
Note: the replacement buttons must use different names from the originals, otherwise a duplicate-name error is raised during the replace operation.
Severity
Low / Medium — workaround exists, but the REPLACE-FOOTER pattern is documented and intuitive; the silent scope limitation is confusing.
Summary
REPLACE widgetName WITH { ... }fails with "widget not found" when the target widget is aFOOTERnested inside aDATAVIEW, even thoughDESCRIBE PAGEcorrectly reports the widget by that name.Environment
Steps to Reproduce
Page has this structure (confirmed by
DESCRIBE PAGE):Attempt to replace the footer:
Result:
Expected Behaviour
The FOOTER and its children are replaced.
Actual Behaviour
mxcli cannot find
footer1even thoughDESCRIBE PAGEshows it at that name. The widget appears to be outside the REPLACE traversal scope when nested inside a DataView.Workaround
Replace individual child buttons instead of the parent FOOTER:
Note: the replacement buttons must use different names from the originals, otherwise a duplicate-name error is raised during the replace operation.
Severity
Low / Medium — workaround exists, but the REPLACE-FOOTER pattern is documented and intuitive; the silent scope limitation is confusing.