Skip to content

Listing row actions

In Mateu, listing rows are UI models.

They are not required to match your domain model.

A row can include:

  • fields to display
  • status indicators
  • contextual actions

public record ChangeRow(
@Hidden String id,
String page,
String country,
String language,
Status status,
ColumnAction action
) implements Identifiable {}
new ColumnAction("compare", "Compare")

Use ColumnAction when there is a single action for the row.


public record ReleaseRow(
String id,
String site,
String name,
String user,
String date,
Status status,
ColumnActionGroup action
) {}
new ColumnActionGroup(new ColumnAction[]{
new ColumnAction("setAsBlue", "Set as blue"),
new ColumnAction("setAsGreen", "Set as green"),
new ColumnAction("preview", "Preview")
})

Use ColumnActionGroup when multiple actions are needed.


Each action has an actionId:

new ColumnAction("compare", "Compare")

This id is used by Mateu to route the action to the backend.


Rows should include an identifier:

@Hidden String id;

This allows Mateu to know which row triggered the action.


Status status

Status is rendered visually (badge-like), not as plain text.


List<ChangeRow> rows = changes.stream()
.map(dto -> new ChangeRow(
dto.pageId(),
dto.page(),
dto.country(),
dto.language(),
new Status(mapStatus(dto.status()), dto.status().name()),
new ColumnAction("compare", "Compare")
))
.toList();

Rows are typically built in adapters or query services.


Rows are UI representations, not domain entities.

They can include:

  • formatted data
  • derived fields
  • UI-specific constructs (actions, status)

Use row actions when:

  • actions depend on the specific row
  • you need contextual operations
  • actions should be visible directly in the list

TypeUse when
ColumnActionA single action applies to every row
ColumnActionGroupMultiple contextual actions per row
@Hidden String idRequired so Mateu knows which row triggered the action
StatusRender a field as a visual badge rather than plain text

Rows are UI models, not domain entities. They can include formatted data, derived fields, and UI-specific constructs alongside the action controls.