MultiView
MultiView is the root base class of the orchestrator hierarchy. It handles the routing contract — deciding which sub-screen to render for a given URL — and wraps each resolved view in the component shell that drives the navigation flow.
public abstract class MultiView implements ActionHandler, ActionSupplier, RouteHandler, DtoSupplierYou never extend MultiView directly. Extend Crud, AutoCrud, EditableView, or Wizard instead. MultiView is documented here so you can understand what those classes inherit.
Implemented interfaces
Section titled “Implemented interfaces”| Interface | What it provides |
|---|---|
ActionHandler | Dispatches named actions triggered from the UI |
ActionSupplier | Declares which actions the orchestrator exposes |
RouteHandler | Receives the URL and decides which sub-component to render |
DtoSupplier | Wraps the orchestrator in an AppShell mediator on first load |
How routing works
Section titled “How routing works”When a request arrives at an orchestrated route (e.g. /products), Mateu calls handleRoute() on the orchestrator. The orchestrator:
- On first load — renders itself as a mediator shell that hosts the sub-screens.
- On subsequent navigation — calls the abstract
resolveInternalRoute()to determine which sub-screen to show. - Wraps the resolved component in a
ServerSideComponentDtowith the correct state, triggers, and dirty-state tracking.
The subclass (Crud) provides the concrete resolveInternalRoute() that maps URL patterns to list/view/edit/new screens. EditableView provides its own implementation for the view/edit pattern.
Abstract method
Section titled “Abstract method”protected abstract OrchestrationResult resolveInternalRoute( String route, HttpRequest httpRequest);Overridable methods
Section titled “Overridable methods”| Method | Default | Override to… |
|---|---|---|
layout() | AppLayout.SINGLE_SLOT | Use AppLayout.SPLIT for a split-panel layout (also available via @SplitCrud) |
triggers(viewName, httpRequest) | List.of() | Return triggers that fire when a specific sub-screen ("list", "view", "edit", "new") loads |
Orchestrator hierarchy
Section titled “Orchestrator hierarchy”MultiView├── Crud<View, Editor, CreationForm, Filters, Row, IdType>│ ├── FilteredAutoCrud<Filters, T>│ │ └── AutoCrud<T>│ │ └── (your class)│ └── (your class)├── EditableView<V, E>│ └── AutoEditableView<T>│ └── (your class)└── Wizard └── (your class)- Full control with Crud — the direct subclass used for explicit multi-screen CRUD
- AutoCrud — the simplest entry point built on top of
Crud - EditableView — single-entity view with an Edit button, no list