Skip to content

Annotations

Mateu’s declarative UI is driven by Java annotations placed on classes, fields, and methods. The table below lists every annotation by category.

AnnotationTargetDescription
@UIClassRegisters a class as a Mateu UI entry point
@RouteClassMaps a class to a URL path
@HomeRouteDeclares the default home path
@BaseRouteSets a base path prefix
@UISpecClassUses a YAML file as the component tree instead of ComponentTreeSupplier
AnnotationTargetDescription
@AppClassApplies an app layout variant; optional themeToggle adds dark/light mode switch
@DrawerClosedClassStarts the drawer/sidebar in closed state
@LogoClassSets the app logo URL
@FavIconClassSets the browser favicon
@KeycloakSecuredClassProtects a page with Keycloak authentication
@AIClassEnables 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.

AnnotationTargetDescription
@ScriptClassInjects a <script> tag (supports type, defer, async, crossorigin)
@LinkClassInjects a <link> tag (stylesheets, preloads, fonts…)
@MetaClassInjects a <meta> tag (name, http-equiv, charset)
AnnotationTargetDescription
@TitleClassSets the page title
@PageTitleClassSets the browser tab title
@SubtitleClassSets the page subtitle
@LabelField, methodOverrides the display label for a field
@HelpClass, field, methodAdds a help text / tooltip
AnnotationTargetDescription
@StyleClass, fieldInline CSS applied to the element
@CssClassesClass, fieldCSS class names applied to the element
@DivStyleClass, fieldInline CSS applied to the wrapping div
AnnotationTargetDescription
@FormLayoutClassRenders a multi-column form layout
@HorizontalLayoutClassRenders children in a horizontal row
@VerticalLayoutClassRenders children in a vertical column
@SplitLayoutClassRenders a resizable split panel
@ScrollerClassWraps content in a scrollable container
@FoldedLayoutClassRenders each @Section as a collapsible panel
@CompactClassHigh-density mode — tighter spacing and smaller controls
@Zones / @ZoneClassDeclares side-by-side column zones for sections
@InlineFieldExpands a nested type’s fields into the parent section inline
@DetailFormCustomisationFieldControls position and columns of an embedded detail form
@MasterDetailFieldRenders a field as a master-detail panel
AnnotationTargetDescription
@SectionField, methodGroups following fields under a heading
@TabsClassWraps page content in a tabbed container
@TabField, methodAssigns a field to a named tab
@AccordionClassWraps content in an accordion
@AccordionPanelField, methodAssigns a field to an accordion panel
@ListFieldRenders a list (ordered or unordered)
@H1@H5FieldRenders the field value as a heading
AnnotationTargetDescription
@ButtonField, methodRenders a button that calls the annotated method
@ActionClass, methodAttaches a configurable action
@RowActionMethodMarks a method as a row-level action in a grid
@ListToolbarButtonMethodAdds a toolbar button to a listing
@ViewToolbarButtonMethodAdds a toolbar button to a view
@ToolbarField, methodPlaces an element in the toolbar area
@WizardCompletionActionField, methodMarks the final action of a wizard
@BannerMethodRenders a highlighted message block below the page header
@FabMethodRenders a Floating Action Button fixed to the bottom-right
AnnotationTargetDescription
@MenuFieldMarks a field as a navigation menu entry
@BreadcrumbDefines a single breadcrumb item
@BreadcrumbsClassAdds a breadcrumb trail to a page
@HeaderFieldPlaces a field in the page header slot
@FooterFieldPlaces a field in the page footer slot
AnnotationTargetDescription
@HiddenClass, fieldHides the field
@HiddenInCreateFieldHides the field only in create mode
@HiddenInEditorFieldHides the field only in editor mode
@HiddenInListFieldHides the field only in list view
@HiddenInViewFieldHides the field only in view mode
@ReadOnlyClass, fieldMakes the field non-editable
@DisabledClass, field, methodDisables the field or button
@EyesOnlyClass, field, methodRestricts visibility to specific roles/groups
@EditableOnlyWhenCreatingFieldAllows editing only during record creation
AnnotationTargetDescription
@ValidationClassAdds a cross-field validation condition
@RuleClassAdds a conditional UI rule (show/hide, enable/disable)
AnnotationTargetDescription
@TriggerClassFires an action on a lifecycle event
AnnotationTargetDescription
@LookupFieldRenders a lookup / search field
@OptionDeclares an option for an enum or select field
@OptionsLayoutFieldControls how options are laid out
@UseRadioButtonsFieldRenders enum options as radio buttons
@RepresentationFieldSets a non-default field stereotype
@StereotypeFieldAlias for @Representation
@FilterableFieldMarks a field as filterable in a listing
@ColspanFieldSets how many columns a field spans
@ColumnWidthFieldSets the column width in a grid
AnnotationTargetDescription
@KPIFieldRenders a field as a KPI tile
@StatusFieldMaps field values to coloured status badges
@MappedValueFieldMaps raw values to display strings
@SliderMin / @SliderMaxFieldSets the min/max range for a slider field
@DetailsFieldRenders a field inside a collapsible details panel
@WidgetFieldRenders a field as a widget
@PlainTextFieldRenders the field value as plain read-only text (no input chrome)
@BadgeFieldRenders a boolean field as an inline coloured chip in the form body
@BadgeInHeaderFieldRenders a field as a status chip in the page header strip
@MultilineFieldAllows a @PlainText field to wrap instead of truncate
AnnotationTargetDescription
@MasterDetailFieldEmbeds a master-detail grid for a related collection
@CompositionFieldLinks to a composed entity via a CRUD repository
@SubresourceFieldMarks a field as a sub-resource
@PrimaryKeyFieldMarks the primary key field
@GeneratedValueFieldGenerates 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.