Repository navigation
textbox: no MDL property for the On enter key press action (OnEnterKeyPressAction) - every spelling is dropped on write (MDL-WIDGET07) #1662
Description
mxcli v0.28.0 (2026-10-23) · Mendix 11.14.0 (blank repro project) — first hit in an 11.15.0 app · OS Windows Server 2025
Summary
A text box's On enter key press action (Studio Pro: Events → On enter key press; stored as OnEnterKeyPressAction on
Forms$TextBox — mxcli's own model SDK already has (*TextBox).OnEnterKeyPressAction / SetOnEnterKeyPressAction) has no MDL
property. Every spelling tried is reported by check as MDL-WIDGET07 "not recognized and will be silently dropped on write",
exec drops it, describe shows nothing and mx check passes - so a search box that should search on Enter cannot be
generated. OnChange: on the same widget is written, which is the natural model for the missing property.
Minimal repro
CREATE MODULE ModK;
CREATE OR MODIFY NON-PERSISTENT ENTITY ModK.Query ( SearchText: String(200) );
CREATE OR MODIFY MICROFLOW ModK.ACT_Search ( $Query: ModK.Query ) RETURNS Boolean AS $Ok
BEGIN
RETURN true;
END;
CREATE OR MODIFY MICROFLOW ModK.DS_Query () RETURNS ModK.Query AS $Query
BEGIN
$Made = CREATE ModK.Query ( SearchText = '' );
RETURN $Made;
END;
CREATE OR MODIFY PAGE ModK.SearchPage ( Title: 'Search', Layout: Atlas_Core.Atlas_Default ) {
DATAVIEW dvQuery (DataSource: MICROFLOW ModK.DS_Query) {
-- control: an On change action is written
TEXTBOX tbChange (Label: 'On change', Attribute: SearchText, OnChange: CALL MICROFLOW ModK.ACT_Search(Query = $currentObject))
-- the On enter key press action, three spellings
TEXTBOX tbEnter1 (Label: 'Enter 1', Attribute: SearchText, OnEnterKeyPress: CALL MICROFLOW ModK.ACT_Search(Query = $currentObject))
TEXTBOX tbEnter2 (Label: 'Enter 2', Attribute: SearchText, OnEnterKeyPressAction: CALL MICROFLOW ModK.ACT_Search(Query = $currentObject))
TEXTBOX tbEnter3 (Label: 'Enter 3', Attribute: SearchText, OnEnterKey: CALL MICROFLOW ModK.ACT_Search(Query = $currentObject))
}
};Expected
One of the spellings (by analogy with OnChange:, OnEnterKeyPress: reads best) writes OnEnterKeyPressAction as Studio Pro
does, and describe page prints it back, so a describe → exec round trip keeps it. The text area has the same property.
Actual
$ mxcli check <repro>/scripts/ewo_ek.mdl -p Repro.mpr --references
⚠ page ModK.SearchPage: widget `tbEnter1` (textbox) property `OnEnterKeyPress` is not recognized and will be silently dropped on write [MDL-WIDGET07]
⚠ page ModK.SearchPage: widget `tbEnter2` (textbox) property `OnEnterKeyPressAction` is not recognized and will be silently dropped on write [MDL-WIDGET07]
⚠ page ModK.SearchPage: widget `tbEnter3` (textbox) property `OnEnterKey` is not recognized and will be silently dropped on write [MDL-WIDGET07]
$ mxcli -p Repro.mpr -c "describe page ModK.SearchPage"
textbox tbChange (
Label: 'On change',
Attribute: SearchText,
OnChange: call microflow ModK.ACT_Search(Query = $currentObject)
)
textbox tbEnter1 (Label: 'Enter 1', Attribute: SearchText)
textbox tbEnter2 (Label: 'Enter 2', Attribute: SearchText)
textbox tbEnter3 (Label: 'Enter 3', Attribute: SearchText)
$ mx check Repro.mpr
The app contains: 0 errors.
What narrows it down
| Variant | Result |
|---|---|
OnChange: (control) |
written, described back |
OnEnterKeyPress: |
MDL-WIDGET07, dropped |
OnEnterKeyPressAction: (the stored name) |
MDL-WIDGET07, dropped |
OnEnterKey: |
MDL-WIDGET07, dropped |
Suggestions
- Map
OnEnterKeyPress:(and the stored name as an alias) toOnEnterKeyPressActionon text box and text area, accepting the
same action formsOnChange:accepts; describe it back. - Until then, the MDL-WIDGET07 hint could name the gap ("no MDL property for the On enter key press action yet") rather than
read like a typo.
Workaround we use
The action is set in Studio Pro (its MCP, ped_update_document) after the page is generated, and the generating script carries
a comment saying so - re-running the page statement removes it again. Before that we used an Events widget whose on-load
nanoflow installed a JavaScript key handler: it works, but it is code a model property should make unnecessary.
Session log (isolated HOME, paths redacted)
{"time":"2026-10-27T15:31:58.6690602+03:00","level":"INFO","msg":"session_start","version":"v0.28.0","go":"go1.27.3","os":"windows","arch":"amd64","mode":"mxcli check","args":["mxcli","check","<repro>/scripts/ewo_ek.mdl","-p","Repro.mpr","--references"],"pid":74300,"parent_pid":""}
{"time":"2026-10-27T15:32:00.8759406+03:00","level":"INFO","msg":"connect","mpr_path":"Repro.mpr","mendix_version":"11.14.0","mpr_format":2}
{"time":"2026-10-27T15:32:00.8759406+03:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'Repro.mpr'","duration_ms":1}
{"time":"2026-10-27T15:32:01.3970816+03:00","level":"INFO","msg":"session_end","commands_executed":1,"errors_count":0,"duration_s":2,"pid":74300}
{"time":"2026-10-27T15:32:02.0826956+03:00","level":"INFO","msg":"session_start","version":"v0.28.0","go":"go1.27.3","os":"windows","arch":"amd64","mode":"mxcli exec","args":["mxcli","exec","<repro>/scripts/ewo_ek.mdl","-p","Repro.mpr"],"pid":73120,"parent_pid":""}
{"time":"2026-10-27T15:32:02.1361897+03:00","level":"INFO","msg":"connect","mpr_path":"Repro.mpr","mendix_version":"11.14.0","mpr_format":2}
{"time":"2026-10-27T15:32:02.1361897+03:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'Repro.mpr'","duration_ms":2}
{"time":"2026-10-27T15:32:02.9088841+03:00","level":"INFO","msg":"execute","stmt_type":"CreateModuleStmt","stmt_summary":"create module ModK","duration_ms":128}
{"time":"2026-10-27T15:32:02.9764745+03:00","level":"INFO","msg":"execute","stmt_type":"CreateEntityStmt","stmt_summary":"create entity ModK.Query","duration_ms":67}
{"time":"2026-10-27T15:32:03.052653+03:00","level":"INFO","msg":"execute","stmt_type":"CreateMicroflowStmt","stmt_summary":"create microflow ModK.ACT_Search","duration_ms":76}
{"time":"2026-10-27T15:32:03.1296844+03:00","level":"INFO","msg":"execute","stmt_type":"CreateMicroflowStmt","stmt_summary":"create microflow ModK.DS_Query","duration_ms":77}
{"time":"2026-10-27T15:32:03.2059262+03:00","level":"INFO","msg":"execute","stmt_type":"CreatePageStmtV3","stmt_summary":"create page ModK.SearchPage","duration_ms":76}
{"time":"2026-10-27T15:32:03.2189297+03:00","level":"INFO","msg":"session_end","commands_executed":6,"errors_count":0,"duration_s":1,"pid":73120}
{"time":"2026-10-27T15:32:03.8316712+03:00","level":"INFO","msg":"session_start","version":"v0.28.0","go":"go1.27.3","os":"windows","arch":"amd64","mode":"batch","args":["mxcli","-p","Repro.mpr","-c","describe page ModK.SearchPage"],"pid":73816,"parent_pid":""}
{"time":"2026-10-27T15:32:03.897201+03:00","level":"INFO","msg":"connect","mpr_path":"Repro.mpr","mendix_version":"11.14.0","mpr_format":2}
{"time":"2026-10-27T15:32:03.897201+03:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'Repro.mpr'","duration_ms":1}
{"time":"2026-10-27T15:32:03.953493+03:00","level":"INFO","msg":"execute","stmt_type":"DescribeStmt","stmt_summary":"describe PAGE ModK.SearchPage","duration_ms":35}
{"time":"2026-10-27T15:32:03.9541249+03:00","level":"INFO","msg":"session_end","commands_executed":2,"errors_count":0,"duration_s":0,"pid":73816}
Activity
Merge pull request mendixlabs#1662 from ako/claude/funny-lovelace-wtudp7
fix: give a text box's "On enter key press" action an MDL property (#…