Class ListSpec
EntityView.list(com.onec.ui.ListSpec).
With no calls the list shows the auto-generated columns (built-in system
columns + visible custom fields, in their configured order). Call
columns(java.lang.String...) to take explicit control of which columns appear and in what
order, or hide(java.lang.String...)/label(java.lang.String, java.lang.String) to tweak the defaults. Field names are
the entity's Java field names (e.g. "displayName"); "code",
"description" (catalogs) and "number", "date",
"posted" (documents) address the built-in system columns.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA resolved list filter: the bound field, its label, the control type and — for theListSpec.FilterType.OPTIONS/ListSpec.FilterType.MULTI_OPTIONScontrols — its choices.static final classFluent builder for one filter;ListSpec.FilterBuilder.options/ListSpec.FilterBuilder.multiOptions(java.lang.String...)/ListSpec.FilterBuilder.contains()/ListSpec.FilterBuilder.startsWith()/ListSpec.FilterBuilder.dateRange()pick the control type.static enumHow a filter narrows the list query (and which control the grid renders). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd an explicit column with a custom header label.Take explicit control: only these fields, in this order.booleanexplicit()Declare a user-facing filter control bound tofield(an entity field name, like the column/sort field names).filters()The declared list filters, in declaration order.hidden()Hide fields from the default column set (ignored whencolumns(java.lang.String...)is used).include()Override a column's header label.labels()noSearch()Turn the search bar off for this list.booleansearchable(boolean searchable) Whether the list shows a search bar (server-side filter across text columns).The column the list is sorted by initially (a field name); ascending.The initial sort column + direction.booleantitle()
-
Constructor Details
-
ListSpec
public ListSpec()
-
-
Method Details
-
title
-
searchable
Whether the list shows a search bar (server-side filter across text columns). Default on. -
noSearch
Turn the search bar off for this list. -
sortBy
The column the list is sorted by initially (a field name); ascending. -
sortBy
The initial sort column + direction. -
columns
Take explicit control: only these fields, in this order. -
column
Add an explicit column with a custom header label. -
label
Override a column's header label. -
hide
Hide fields from the default column set (ignored whencolumns(java.lang.String...)is used). -
filter
Declare a user-facing filter control bound tofield(an entity field name, like the column/sort field names). Unlike a toolbarinput— which feeds action handlers — a filter drives the list query itself: its value narrows the rows the grid shows. Returns aListSpec.FilterBuilder; pick the control withListSpec.FilterBuilder.options(a SELECT matched for equality),ListSpec.FilterBuilder.multiOptions(java.lang.String...)(a multi-select matched asfield IN (…)),ListSpec.FilterBuilder.contains()/ListSpec.FilterBuilder.startsWith()(a field-scoped typeahead for high-cardinality fields, matched case-insensitively asLIKE), orListSpec.FilterBuilder.dateRange()(from/to pickers, afield >= from AND field <= torange).When several filters are declared they combine with
AND: each contributes its ownWHEREfragment and the row must satisfy all of them. AmultiOptionsfilter is internally anOR/INover its picked values, but across different filters the combination is alwaysAND. A filter whose control is left empty (no selection, blank text) contributes no constraint, and a filter on a field the entity no longer has degrades to "no constraint" rather than failing the list.list.filter("season").options("2024", "2025", "2026"); // SELECT -> season = value list.filter("doctorName").label("Doctor").contains(); // typeahead -> doctor_name ILIKE %v% list.filter("role").multiOptions("Хирург", "Терапевт"); // multi-select -> role IN (…) list.filter("checkIn").dateRange(); // from/to pickers -> checkIn range -
title
-
include
-
labels
-
explicit
public boolean explicit() -
searchable
public boolean searchable() -
sortField
-
sortDescending
public boolean sortDescending() -
filters
The declared list filters, in declaration order.
-