Commit 67102aa
fix: populate TextTemplate translation defaults + Editable=Always on filters
Refs: mendixlabs#541
Two further CE0463 gaps closed:
1. TextTemplate translation defaults (4 templates: combobox.json + 3
datagrid filters). Widget XML <translations> elements on textTemplate
properties (e.g. DatagridTextFilter's screenReaderInputCaption with
en_US='Search', de_DE='Suche', nl_NL='Zoeken') become defaults that
Studio Pro copies into the WidgetObject's Forms$ClientTemplate
Template.Items at widget instantiation time.
Previously: the embedded templates carried these translations only on
the PropertyType's ValueType.Translations (the type-level definition),
but the WidgetObject's WidgetValue.TextTemplate.Template.Items was
empty. So mxcli emitted textfilters with no translation defaults,
triggering CE0463.
Fix: bulk-populated WidgetObject.Properties[].Value.TextTemplate.
Template.Items from PropertyType.ValueType.Translations for every
textTemplate property in every embedded template. 4 entries added
across 4 files.
2. Filter widget Editable override (datagrid_builder.go line 87). The
wrapper pages.CustomWidget struct explicitly set Editable="Inherited"
even though buildFilterWidgetBSON wrote "Always" into the inner BSON.
The struct value wins at serialization time, so the final BSON ended
up "Inherited" — mismatch with Studio Pro's "Always" for filter
widgets inside DataGrid columns. Fixed.
Verification: focused textFilter1 diff (PgTest.DataGridExample vs mxcli
recreation in same project, UUID-normalized): was 71 lines, now 0 lines.
The textfilter widget BSON is now byte-identical to a Studio-Pro-emitted
textfilter for the same MDL input.
CE0463 status: still firing on parent DataGrid widgets. Diff at the
DataGrid-WidgetObject level (excluding columns property) shows 72
remaining lines — Studio Pro populates additional TextTemplate values
(`Microflows$TextTemplate`, populated Template.Items arrays) and one
boolean value (true vs false) on properties the mxcli output leaves
default/null. Closing these requires either runtime population of more
default values from PropertyType.ValueType, or further targeted
embedded-template patching. Tracked under mendixlabs#541 for follow-up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 301e329 commit 67102aa
5 files changed
Lines changed: 67 additions & 5 deletions
File tree
- mdl/backend/mpr
- sdk/widgets/templates/mendix-11.6
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1206 | 1206 | | |
1207 | 1207 | | |
1208 | 1208 | | |
1209 | | - | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1210 | 1222 | | |
1211 | 1223 | | |
1212 | 1224 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2156 | 2156 | | |
2157 | 2157 | | |
2158 | 2158 | | |
2159 | | - | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
2160 | 2172 | | |
2161 | 2173 | | |
2162 | 2174 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
473 | 493 | | |
474 | 494 | | |
475 | 495 | | |
| |||
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | | - | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
1288 | 1306 | | |
1289 | 1307 | | |
1290 | 1308 | | |
| |||
0 commit comments