Skip to content

Commit 14a4e7c

Browse files
akoclaude
andcommitted
docs: update page parameter docs for primitive type support
Update syntax references from `$Param: Module.Entity` to `$Param: Module.Entity | Type` and note that primitive parameters (String, Integer, Decimal, Boolean, DateTime) require Mendix 11.6+. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a913fbb commit 14a4e7c

File tree

9 files changed

+19
-18
lines changed

9 files changed

+19
-18
lines changed

.claude/skills/mendix/create-page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Guide for writing CREATE PAGE statements in Mendix Definition Language (MDL).
88
```sql
99
CREATE [OR REPLACE] PAGE Module.PageName
1010
(
11-
[Params: { $ParamName: Module.EntityType, ... },]
11+
[Params: { $ParamName: Module.EntityType | PrimitiveType, ... },]
1212
[Variables: { $varName: DataType = 'defaultExpression', ... },]
1313
Title: 'Page Title',
1414
Layout: Module.LayoutName,

cmd/mxcli/help_topics/page.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Basic syntax:
1414
-- widgets
1515
}
1616

17-
With parameters (for detail pages):
17+
With parameters (entity or primitive types):
1818
CREATE PAGE Module.Name
1919
(
20-
Params: { $Param: Module.Entity },
20+
Params: { $Param: Module.Entity, $Qty: Integer },
2121
Title: 'Title',
2222
Layout: Module.Layout
2323
)

cmd/mxcli/help_topics/snippet.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Basic syntax (no parameters):
1010
-- widgets
1111
}
1212

13-
With parameters:
13+
With parameters (entity or primitive types):
1414
CREATE SNIPPET Module.Name (
15-
Params: { $Param: Module.Entity }
15+
Params: { $Param: Module.Entity, $Label: String }
1616
)
1717
{
1818
DATAVIEW dv (DataSource: $Param) {

docs-site/src/appendixes/version-compatibility.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ The tables below show exactly which features are available on each Mendix versio
6969
| Conditional visibility | `Visible: [xpath]` | -- | -- | -- | Yes |
7070
| Conditional editability | `Editable: [xpath]` | -- | -- | -- | Yes |
7171
| Responsive column widths | `TabletWidth: 6, PhoneWidth: 12` | -- | -- | -- | Yes |
72-
| Page parameters | `Params: { $Item: Module.Entity }` | -- | -- | -- | Yes |
72+
| Page parameters (entity) | `Params: { $Item: Module.Entity }` | -- | -- | -- | Yes |
73+
| Page parameters (primitive) | `Params: { $Qty: Integer }` | -- | -- | -- | 11.6+ |
7374
| Page variables | `Variables: { ... }` | -- | -- | -- | Yes |
7475
| Design properties (Atlas v3) | `DesignProperties: [...]` | -- | -- | -- | Yes |
7576

docs-site/src/language/page-structure.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Every MDL page has three main parts: page properties (title, layout, parameters)
77
```sql
88
CREATE [OR REPLACE] PAGE <Module>.<Name>
99
(
10-
[Params: { $Param: Module.Entity [, ...] },]
10+
[Params: { $Param: Module.Entity | Type [, ...] },]
1111
Title: '<title>',
1212
Layout: <Module.LayoutName>
1313
[, Folder: '<path>']
@@ -59,7 +59,7 @@ CREATE PAGE MyModule.Customer_Edit
5959

6060
## Page Parameters
6161

62-
Page parameters define entity objects that must be passed when the page is opened. Parameters use the `$` prefix:
62+
Page parameters define values that must be passed when the page is opened. Parameters use the `$` prefix and can be entity types or primitive types (String, Integer, Decimal, Boolean, DateTime):
6363

6464
```sql
6565
(
@@ -68,11 +68,11 @@ Page parameters define entity objects that must be passed when the page is opene
6868
)
6969
```
7070

71-
Multiple parameters are comma-separated:
71+
Multiple parameters are comma-separated, and can mix entity and primitive types:
7272

7373
```sql
7474
(
75-
Params: { $Order: Sales.Order, $Customer: Sales.Customer },
75+
Params: { $Order: Sales.Order, $Quantity: Integer, $IsNew: Boolean },
7676
...
7777
)
7878
```

docs-site/src/language/pages.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The basic syntax for creating a page:
1818
```sql
1919
CREATE [OR REPLACE] PAGE <Module>.<Name>
2020
(
21-
[Params: { $Param: Module.Entity [, ...] },]
21+
[Params: { $Param: Module.Entity | Type [, ...] },]
2222
Title: '<title>',
2323
Layout: <Module.LayoutName>
2424
[, Folder: '<path>']
@@ -45,7 +45,7 @@ CREATE PAGE MyModule.Home
4545

4646
### Page with Parameters
4747

48-
Pages can receive entity objects as parameters from the calling context:
48+
Pages can receive entity objects or primitive values as parameters from the calling context:
4949

5050
```sql
5151
CREATE PAGE MyModule.Customer_Edit
@@ -70,7 +70,7 @@ CREATE PAGE MyModule.Customer_Edit
7070

7171
| Property | Description | Example |
7272
|----------|-------------|---------|
73-
| `Params` | Page parameters (entity objects passed in) | `Params: { $Order: Sales.Order }` |
73+
| `Params` | Page parameters (entity objects or primitives) | `Params: { $Order: Sales.Order, $Qty: Integer }` |
7474
| `Title` | Page title shown in the browser/tab | `Title: 'Edit Customer'` |
7575
| `Layout` | Layout to use for the page | `Layout: Atlas_Core.PopupLayout` |
7676
| `Folder` | Organizational folder within the module | `Folder: 'Pages/Customers'` |

docs-site/src/reference/page/create-page.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```sql
66
CREATE [ OR REPLACE ] PAGE module.Name
77
(
8-
[ Params: { $param : Module.Entity [, ...] }, ]
8+
[ Params: { $param : Module.Entity | Type [, ...] }, ]
99
Title: 'title',
1010
Layout: Module.LayoutName
1111
[, Folder: 'path' ]
@@ -26,7 +26,7 @@ If `OR REPLACE` is specified and a page with the same qualified name already exi
2626

2727
The page declaration block `( ... )` contains comma-separated key-value properties:
2828

29-
- **Params** -- Page parameters. Each parameter has a `$`-prefixed name and an entity type. Parameters are passed when the page is opened (e.g., from a microflow `SHOW PAGE` or from a data view).
29+
- **Params** -- Page parameters. Each parameter has a `$`-prefixed name and a type — either an entity (`Module.Entity`) or a primitive (`String`, `Integer`, `Decimal`, `Boolean`, `DateTime`). Parameters are passed when the page is opened (e.g., from a microflow `SHOW PAGE` or from a data view). Primitive parameters require Mendix 11.6+.
3030
- **Title** -- The page title displayed in the browser tab or page header.
3131
- **Layout** -- The layout the page is based on. Must be a qualified name referring to an existing layout (e.g., `Atlas_Core.Atlas_Default`, `Atlas_Core.PopupLayout`).
3232
- **Folder** -- Optional folder path within the module. Nested folders use `/` separator.

docs-site/src/reference/page/create-snippet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```sql
66
CREATE [ OR REPLACE ] SNIPPET module.Name
77
(
8-
[ Params: { $param : Module.Entity [, ...] } ]
8+
[ Params: { $param : Module.Entity | Type [, ...] } ]
99
[, Folder: 'path' ]
1010
)
1111
{
@@ -35,7 +35,7 @@ The optional `Folder` property places the snippet in a subfolder within the modu
3535
: The qualified name of the snippet (`Module.SnippetName`). The module must already exist.
3636

3737
`Params: { ... }`
38-
: Optional snippet parameters. Each parameter has a `$`-prefixed name and an entity type.
38+
: Optional snippet parameters. Each parameter has a `$`-prefixed name and a type (entity or primitive).
3939

4040
`Folder: 'path'`
4141
: Optional folder path within the module.

docs/05-mdl-specification/01-language-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ Creates a page with a widget tree.
719719
```sql
720720
CREATE [OR REPLACE] PAGE <qualified-name>
721721
(
722-
[Params: { $Param: Module.Entity [, ...] },]
722+
[Params: { $Param: Module.Entity | Type [, ...] },]
723723
Title: '<title>',
724724
Layout: <Module.LayoutName>
725725
[, Folder: '<path>']

0 commit comments

Comments
 (0)