一键导入
overview-pages
Build CRUD page sets in Mendix MDL: navigation snippets, overview pages with DataGrid, NewEdit forms, and circular dependency patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build CRUD page sets in Mendix MDL: navigation snippets, overview pages with DataGrid, NewEdit forms, and circular dependency patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Mendix MDL authoring, project navigation, and Docker app lifecycle — entities, microflows, pages, security, navigation, OQL, REST, testing, linting, and migration. Load when working in any Mendix codebase.
MDL Agent Documents — CREATE MODEL, CREATE KNOWLEDGE BASE, CREATE CONSUMED MCP SERVICE, CREATE AGENT syntax and calling agents from microflows
ALTER PAGE / ALTER SNIPPET — SET, INSERT, DROP, REPLACE widget operations on existing pages and snippets
Migration Assessment — structured investigation of non-Mendix projects for migration planning across technology stack, data model, business logic, UI, integrations, and security
Assess Mendix Project Quality — automated linting, catalog queries, naming conventions, security, maintainability, performance, and architecture review with scored report
Browse Integration Services and Contracts — SHOW/DESCRIBE OData, REST, business event, and database connection services; query MDL CATALOG integration tables; import external entities
| name | overview-pages |
| description | Build CRUD page sets in Mendix MDL: navigation snippets, overview pages with DataGrid, NewEdit forms, and circular dependency patterns |
| compatibility | opencode |
<pattern_summary>
| Component | Type | Purpose | Key Widgets |
|---|---|---|---|
Entity_Menu | Snippet | Vertical sidebar navigation | NAVIGATIONLIST with ITEM actions |
Entity_Overview | Page | List all records | SNIPPETCALL (sidebar), DATAGRID, Heading |
Entity_NewEdit | Page | Create/Edit form | DataView, Input widgets, Save/Cancel |
| </pattern_summary> |
<navigation_menu_snippet>
create snippet Module.Entity_Menu
{
navigationlist navMenu {
item itemCustomers (caption: 'Customers', action: show_page Module.Customer_Overview)
item itemOrders (caption: 'Orders', action: show_page Module.Order_Overview)
item itemProducts (caption: 'Products', action: show_page Module.Product_Overview)
}
}
create [or replace] snippet Module.SnippetName
[(
params: { $ParamName: Module.EntityType }
)]
[folder 'path']
{
-- Widget definitions (same as pages)
}
navigationlist widgetName {
item itemName (caption: 'Caption', action: show_page Module.PageName)
item itemName (caption: 'Caption', action: microflow Module.MicroflowName)
item itemName (caption: 'Caption', action: close_page)
}
</navigation_menu_snippet>
<overview_page_template>
create page Module.Entity_Overview
(
title: 'Entity Overview',
layout: Atlas_Core.Atlas_Default,
folder: 'OverviewPages'
)
{
layoutgrid mainGrid {
row row1 {
column colNav (desktopwidth: 2) {
snippetcall navMenu (snippet: Module.Entity_Menu)
}
column colContent (desktopwidth: 10) {
dynamictext heading (content: 'Entities', rendermode: H2)
datagrid EntityGrid (datasource: database Module.Entity) {
column colName (attribute: Name, caption: 'Name')
column colDescription (attribute: description, caption: 'Description')
}
}
}
}
}
-- Simple snippet call
snippetcall widgetName (snippet: Module.SnippetName)
-- With parameters (for parameterized snippets):
snippetcall widgetName (snippet: Module.SnippetName, params: {Customer: $Customer})
datagrid GridName (
datasource: database from Module.Entity where [IsActive = true] sort by Name asc,
selection: single|multiple|none
) {
column colName (attribute: attributename, caption: 'Label')
column colCustom (caption: 'Custom') {
-- Nested widgets (ACTIONBUTTON, LINKBUTTON, DYNAMICTEXT)
}
}
Properties:
datasource: database from Module.Entity - Entity data source (required)where [condition] - Optional XPath filtersort by attr asc|desc - Optional sortingselection: single|multiple|none - Optional selection modeColumn Properties (non-default only in DESCRIBE output):
| Property | Values | Default |
|---|---|---|
Sortable | true/false | true (with attribute) |
Resizable | true/false | true |
Hidable | yes/hidden/no | yes |
ColumnWidth | autofill/autoFit/manual | autofill |
| </overview_page_template> |
<newedit_page_template>
create page Module.Entity_NewEdit
(
params: { $entity: Module.Entity },
title: 'Edit Entity',
layout: Atlas_Core.PopupLayout,
folder: 'OverviewPages'
)
{
layoutgrid mainGrid {
row row1 {
column col1 (desktopwidth: autofill) {
dataview dataView1 (datasource: $entity) {
-- Input fields for each attribute
textbox txtName (label: 'Name', attribute: Name)
textbox txtDescription (label: 'Description', attribute: description)
datepicker dpDueDate (label: 'Due Date', attribute: DueDate)
combobox cbStatus (label: 'Status', attribute: status)
footer footer1 {
actionbutton btnSave (caption: 'Save', action: save_changes, buttonstyle: success)
actionbutton btnCancel (caption: 'Cancel', action: cancel_changes)
}
}
}
}
}
}
create page Module.PageName
(
params: { $ParamName: Module.EntityName },
title: '...',
layout: ...
)
$store, $Customer)datasource: $ParamName)
</newedit_page_template><widget_selection_guide>
| Attribute Type | Widget | Example |
|---|---|---|
| String | textbox | Name, Description |
| String (long) | textarea | Comments, Notes |
| Integer, Long, Decimal | textbox | Price, Quantity |
| Boolean | checkbox or radiobuttons | IsActive, IsPublished |
| DateTime | datepicker | DueDate, OrderDate |
| Enumeration | combobox or radiobuttons | Status, Type |
| Association (reference) | combobox with DataSource | Category, Owner |
Note: dropdown is deprecated. Use combobox for enumeration attributes.
ComboBox modes:
combobox cb (label: 'status', attribute: status)combobox cb (label: 'Customer', attribute: Order_Customer, datasource: database MyModule.Customer, CaptionAttribute: Name)Reserved Attribute Names: Do not use CreatedDate, ChangedDate, owner, ChangedBy — these are system attributes automatically added to all entities.
</widget_selection_guide>
<button_styles>
| Style | Use Case | Color |
|---|---|---|
success | Save, Confirm | Green |
default | Cancel, Back | Gray |
primary | Primary action | Blue |
danger | Delete | Red |
warning | Caution actions | Yellow |
| </button_styles> |
<circular_dependency_pattern>
When a navigation snippet references pages (via show_page) and those pages reference the snippet (via snippetcall), use the placeholder pattern:
-- Step 1: Create placeholder snippet (pages can reference this)
create snippet Module.NavigationMenu
{
layoutgrid navGrid {
row row1 {
column col1 (desktopwidth: 12) {
dynamictext loading (content: 'Loading...')
}
}
}
}
/
-- Step 2: Create all pages (they reference the snippet via SNIPPETCALL)
create page Module.Customer_NewEdit
(
params: { $Customer: Module.Customer },
title: 'Edit Customer',
layout: Atlas_Core.PopupLayout
)
{
-- ... page content with SNIPPETCALL navMenu (Snippet: Module.NavigationMenu)
}
/
create page Module.Customer_Overview
(
title: 'Customer Overview',
layout: Atlas_Core.Atlas_Default
)
{
-- ... page content with SNIPPETCALL navMenu (Snippet: Module.NavigationMenu)
}
/
-- Step 3: Replace snippet with full navigation (pages now exist)
create or replace snippet Module.NavigationMenu
{
layoutgrid navGrid {
row row1 {
column col1 (desktopwidth: 12) {
actionbutton btnCustomers (caption: 'Customers', action: show_page Module.Customer_Overview)
}
}
}
}
/
</circular_dependency_pattern>
<snippet_commands_reference>
| Command | Description |
|---|---|
show snippets [in module] | List all snippets |
show snippet Module.Name | Show snippet summary |
describe snippet Module.Name | Show snippet MDL source |
create snippet Module.Name { ... } | Create a new snippet |
create or replace snippet Module.Name { ... } | Create or update snippet |
alter snippet Module.Name { ... } | Modify snippet widgets in-place |
drop snippet Module.Name | Delete a snippet |
| </snippet_commands_reference> |
<output_rules>Output MDL code only in code blocks. Keep explanations concise.</output_rules>