Skip to content

Commit 8a33ee1

Browse files
engalarclaude
andcommitted
fix: widget-demo scripts self-contained and mx-check clean
- Add CREATE MODULE and CREATE MODULE ROLE to 01-domain-model.mdl - Add Attributes to DROPDOWNFILTER dfCat (was missing required binding) - Replace LanguageSelector with placeholder (requires runtime config) - Add ALTER USER ROLE to assign WidgetDemo.User to Administrator/User - Fix dropdownfilter.def.json: attrChoice "linked" → "custom" for MDL Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0b0c1c0 commit 8a33ee1

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

mdl-examples/widgetdemo/01-domain-model.mdl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
-- WidgetDemo: self-contained domain model (no external dependencies)
22
-- Provides entities and enumerations for the widget showcase page.
33

4+
CREATE MODULE WidgetDemo;
5+
CREATE MODULE ROLE WidgetDemo.User;
6+
47
CREATE ENUMERATION WidgetDemo.ENUM_Priority (
58
LOW 'Low',
69
MEDIUM 'Medium',

mdl-examples/widgetdemo/03-showcase-page.mdl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ CREATE OR REPLACE PAGE WidgetDemo.WidgetDemo_Showcase (
104104
) {
105105
FILTER flt1 {
106106
TEXTFILTER tfTitle (Attributes: [Title, Code])
107-
DROPDOWNFILTER dfCat
107+
DROPDOWNFILTER dfCat (Attributes: [Category])
108108
NUMBERFILTER nfAmt (Attributes: [Amount])
109109
DATEFILTER dtfDate (Attributes: [DateCreated])
110110
PLUGGABLEWIDGET 'com.mendix.widget.web.dropdownsort.DropdownSort' ddSort1
@@ -425,7 +425,9 @@ CREATE OR REPLACE PAGE WidgetDemo.WidgetDemo_Showcase (
425425
-- 8f: Language + Accessibility
426426
ROW rowS8f {
427427
COLUMN cS8f1 (DesktopWidth: 6) {
428-
PLUGGABLEWIDGET 'com.mendix.widget.web.languageselector.LanguageSelector' langSel1
428+
-- LanguageSelector requires runtime data source and caption — omitted (needs running app)
429+
-- PLUGGABLEWIDGET 'com.mendix.widget.web.languageselector.LanguageSelector' langSel1
430+
DYNAMICTEXT langPlaceholder (Content: '[LanguageSelector — requires runtime config]', RenderMode: Paragraph)
429431
}
430432
COLUMN cS8f2 (DesktopWidth: 6) {
431433
PLUGGABLEWIDGET 'com.mendix.widget.web.accessibilityhelper.AccessibilityHelper' accHelper1 (targetSelector: '.mx-name-accHelper1') {

mdl-examples/widgetdemo/04-seed-and-navigate.mdl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,6 @@ END;
9696
/
9797

9898
GRANT EXECUTE ON MICROFLOW WidgetDemo.SeedAndShowShowcase TO WidgetDemo.User;
99+
100+
ALTER USER ROLE Administrator ADD MODULE ROLES (WidgetDemo.User);
101+
ALTER USER ROLE User ADD MODULE ROLES (WidgetDemo.User);

sdk/widgets/definitions/dropdownfilter.def.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"templateFile": "datagrid-dropdown-filter.json",
55
"defaultEditable": "Always",
66
"propertyMappings": [
7-
{"propertyKey": "attrChoice", "value": "linked", "operation": "primitive"},
7+
{"propertyKey": "attrChoice", "value": "custom", "operation": "primitive"},
88
{"propertyKey": "attributes", "source": "Attributes", "operation": "attributeObjects"},
99
{"propertyKey": "defaultFilter", "source": "FilterType", "operation": "primitive"}
1010
]

0 commit comments

Comments
 (0)