Mateu’s declarative UI is driven by Java annotations placed on classes, fields, and methods. The table below lists every annotation by category.
| Annotation | Target | Description |
|---|
@UI | Class | Registers a class as a Mateu UI entry point |
@Route | Class | Maps a class to a URL path |
@HomeRoute | — | Declares the default home path |
@BaseRoute | — | Sets a base path prefix |
@UISpec | Class | Uses a YAML file as the component tree instead of ComponentTreeSupplier |
| Annotation | Target | Description |
|---|
@App | Class | Applies an app layout variant; optional themeToggle adds dark/light mode switch |
@DrawerClosed | Class | Starts the drawer/sidebar in closed state |
@Logo | Class | Sets the app logo URL |
@FavIcon | Class | Sets the browser favicon |
@KeycloakSecured | Class | Protects a page with Keycloak authentication |
@AI | Class | Enables AI/SSE integration |
These annotations inject tags into the <head> of the generated HTML page at compile time. All three are repeatable and can be combined on the same @UI class.
| Annotation | Target | Description |
|---|
@Script | Class | Injects a <script> tag (supports type, defer, async, crossorigin) |
@Link | Class | Injects a <link> tag (stylesheets, preloads, fonts…) |
@Meta | Class | Injects a <meta> tag (name, http-equiv, charset) |
| Annotation | Target | Description |
|---|
@Title | Class | Sets the page title |
@PageTitle | Class | Sets the browser tab title |
@Subtitle | Class | Sets the page subtitle |
@Label | Field, method | Overrides the display label for a field |
@Help | Class, field, method | Adds a help text / tooltip |
| Annotation | Target | Description |
|---|
@Style | Class, field | Inline CSS applied to the element |
@CssClasses | Class, field | CSS class names applied to the element |
@DivStyle | Class, field | Inline CSS applied to the wrapping div |
| Annotation | Target | Description |
|---|
@Section | Field, method | Groups following fields under a heading |
@Tabs | Class | Wraps page content in a tabbed container |
@Tab | Field, method | Assigns a field to a named tab |
@Accordion | Class | Wraps content in an accordion |
@AccordionPanel | Field, method | Assigns a field to an accordion panel |
@List | Field | Renders a list (ordered or unordered) |
@H1 – @H5 | Field | Renders the field value as a heading |
| Annotation | Target | Description |
|---|
@Button | Field, method | Renders a button that calls the annotated method |
@Action | Class, method | Attaches a configurable action |
@RowAction | Method | Marks a method as a row-level action in a grid |
@ListToolbarButton | Method | Adds a toolbar button to a listing |
@ViewToolbarButton | Method | Adds a toolbar button to a view |
@Toolbar | Field, method | Places an element in the toolbar area |
@WizardCompletionAction | Field, method | Marks the final action of a wizard |
@Banner | Method | Renders a highlighted message block below the page header |
@Fab | Method | Renders a Floating Action Button fixed to the bottom-right |
| Annotation | Target | Description |
|---|
@Menu | Field | Marks a field as a navigation menu entry |
@Breadcrumb | — | Defines a single breadcrumb item |
@Breadcrumbs | Class | Adds a breadcrumb trail to a page |
@Header | Field | Places a field in the page header slot |
@Footer | Field | Places a field in the page footer slot |
| Annotation | Target | Description |
|---|
@Validation | Class | Adds a cross-field validation condition |
@Rule | Class | Adds a conditional UI rule (show/hide, enable/disable) |
| Annotation | Target | Description |
|---|
@Trigger | Class | Fires an action on a lifecycle event |
| Annotation | Target | Description |
|---|
@KPI | Field | Renders a field as a KPI tile |
@Status | Field | Maps field values to coloured status badges |
@MappedValue | Field | Maps raw values to display strings |
@SliderMin / @SliderMax | Field | Sets the min/max range for a slider field |
@Details | Field | Renders a field inside a collapsible details panel |
@Widget | Field | Renders a field as a widget |
@PlainText | Field | Renders the field value as plain read-only text (no input chrome) |
@Badge | Field | Renders a boolean field as an inline coloured chip in the form body |
@BadgeInHeader | Field | Renders a field as a status chip in the page header strip |
@Multiline | Field | Allows a @PlainText field to wrap instead of truncate |
| Annotation | Target | Description |
|---|
@MasterDetail | Field | Embeds a master-detail grid for a related collection |
@Composition | Field | Links to a composed entity via a CRUD repository |
@Subresource | Field | Marks a field as a sub-resource |
@PrimaryKey | Field | Marks the primary key field |
@GeneratedValue | Field | Generates a field value via a ValueGenerator |
Any of the annotations above (except the routing ones) can be bundled into a single
semantic annotation of your own — e.g. @ProveedorId instead of a full @Lookup,
or @ImporteTotal instead of @Stereotype(money) @Label(…) @Help(…). See
Semantic (Composed) Annotations.