1. Domino UI
  2. Data
  3. Data list Pro
Top Examples Docs

Data list

Virtualized list component for huge data sets.

DataList renders only the visible slice of its backing collection while the full record set remains searchable, selectable, and incrementally mutable.

It works with rendered rows such as DataListItem and CheckableDataListItem, wraps each record as a VirtualItem, and delegates window management to ScrollingWindowList and VirtualScrollPanel.

V

the record type represented by the list

I

the rendered row type used for visible items

Abstract data list item

Base rendered row for DataList.

AbstractDataListItem participates in the package virtualization infrastructure, so instances are created only for the records that are currently visible in the window.

It provides the shared clickable row structure, prefix and postfix slots, value storage, search hooks, and selection wiring to the backing VirtualItem.

V

the value type represented by the row

C

the concrete row subtype used for fluent APIs

Data list item

Default rendered row used by DataList.

DataListItem builds on AbstractDataListItem by rendering a simple text span for the record and exposing hooks for custom clickable behavior.

V

the value type represented by the row

Checkable data list item

Checkbox-enabled row variant for DataList.

CheckableDataListItem extends DataListItem by rendering a checkbox in the prefix area and keeping it synchronized with the associated VirtualItem.

V

the value type represented by the row

Data filter

Functional search contract used by virtualized data components.

DataFilter lets DataList and AbstractDataSelect ask whether a record matches a search token without forcing the full collection to be rendered.

T

the record type being filtered

Virtual item

Selection-aware wrapper around a record in a virtualized data set.

Each VirtualItem lazily owns the rendered window item for the current viewport while keeping selection state, metadata, and key resolution attached to the underlying record.

This lets DataList and DataSelect track selection even when a row is currently outside the rendered window.

T

the wrapped record type

I

the rendered window item type

Scrolling window list

Moving-window data structure that powers virtualization for huge backing lists.

ScrollingWindowList decides which records should currently be realized as rendered window items, fires enter and exit callbacks, and supports incremental add and remove operations.

It is the core list engine behind VirtualScrollPanel and, by extension, DataList.

T

the record type in the backing list

I

the rendered window item type

Virtual scroll item mapper

Mapping strategy used by virtualized data components.

VirtualScrollItemMapper converts a backing record into the rendered WindowItem that should appear inside the current viewport.

This abstraction is shared by DataList, DataSelect, and the lower-level virtual scroll infrastructure.

T

the record type to map

I

the rendered window item type

Virtual scroll panel

Base scroll viewport for rendering huge collections through virtualization.

VirtualScrollPanel measures row height, maintains synchronized scroll containers, computes the active record window, and reuses DOM nodes so only the needed slice of a large list is rendered.

DataList uses this panel to keep list interactions responsive even with very large data sets.

T

the record type represented by the panel

E

the DOM element type used by rendered items

I

the rendered window item type

C

the concrete panel subtype

Examples

API Docs: DataList

Static methods

public static DataList<V, I> create(VirtualScrollItemMapper<V, I> mapper, KeyProvider<V> keyProvider)
Creates a virtualized data list backed by the supplied row mapper and key provider.

mapper

maps each record into its rendered list item

keyProvider

resolves stable keys for record lookup and selection

V

the record type

I

the rendered row type



Returns:

a new DataList instance

Public methods

public DataList<V, I> setItems(List<V> items)
Replaces the backing records for the list and rebuilds the virtual window from the new data set.

items

the records to expose through the list



Returns:

this DataList instance

public DataList<V, I> setSearchable(DataFilter<V> dataFilter)
Enables search by attaching a filter that decides whether each record matches the current token.

dataFilter

the search predicate to apply for each record, or null to disable searching



Returns:

this DataList instance

public List<I> getWindowItems()
Returns the currently rendered rows in the visible window rather than the full backing collection.

Returns:

the list items currently materialized in the viewport

public Optional<I> findOptionStarsWith(String token)
Searches the rendered window for the first row whose text starts with the supplied token.

token

the prefix to match against visible rows



Returns:

the first matching rendered row, if one is currently in the window

public DataList<V, I> selectAll(boolean silent)
Marks every virtual item in the list as selected.

silent

true to suppress selection listener callbacks while selecting



Returns:

this DataList instance

public DataList<V, I> deselectAll(boolean silent)
Clears the selection state from every virtual item in the list.

silent

true to suppress deselection listener callbacks while clearing



Returns:

this DataList instance

public VirtualScrollListVirtualScroll<V, I> getVirtualScrollPanel()
Exposes the virtual scroll container that owns window sizing, scroll synchronization, and row recycling.

Returns:

the virtual scroll panel used by this list

API Docs: AbstractDataListItem

Constructors

public void AbstractDataListItem(V value)
Initializes the shared DOM structure, stores the record value, and wires touch and click selection handlers.

value

the record represented by this row

Public methods

public C setSearchable(boolean searchable)
Marks the row as searchable or not for list-side filtering logic.

searchable

true when this row should participate in search matching



Returns:

the current row instance

public boolean onSearch(String token, boolean caseSensitive)
Default search behavior that shows the row only when the token is empty, leaving richer matching to concrete item types.

token

the current search token

caseSensitive

whether search comparisons should preserve case

public C select(boolean silent)
Applies selection styling and forwards the selection change to the parent list.

silent

true to avoid notifying listeners while selecting



Returns:

the current row instance

public C deselect(boolean silent)
Removes selection styling and forwards the deselection change to the parent list.

silent

true to avoid notifying listeners while deselecting



Returns:

the current row instance

public C setSelectable(boolean selectable)
Controls whether the row can transition into the selected state.

selectable

true when selection is allowed for this row



Returns:

the current row instance

public C withBodyElement(ChildHandler<C, DivElement> handler)
Applies custom rendering logic directly to the row body container.

handler

receives the row and its body element for customization



Returns:

the current row instance

API Docs: DataListItem

Constructors

public void DataListItem(String text, V value)
Creates a rendered row with the supplied text content and backing record value.

text

the text displayed inside the row body

value

the record represented by the row

Static methods

public static DataListItem<V> create(String text, V value)
Convenience factory for creating a text-based data list row.

text

the text displayed inside the row body

value

the record represented by the row

V

the value type represented by the row



Returns:

a new DataListItem instance

Public methods

public DataListItem<V> withClickableElement(ChildHandler<DataListItem<V>, AnchorElement> handler)
Allows direct customization of the anchor element that acts as the row's primary interactive surface.

handler

receives the row and its clickable anchor element



Returns:

the current DataListItem instance

public SpanElement getTextElement()
Returns the span that displays the row text content.

Returns:

the text element for this row, or null when no text was supplied

API Docs: CheckableDataListItem

Constructors

public void CheckableDataListItem(String text, V value)
Creates a text row with an embedded checkbox and disables the default click-to-select behavior in favor of checkbox-driven selection.

text

the text displayed inside the row body

value

the record represented by the row

Static methods

public static CheckableDataListItem<V> create(String text, V value)
Convenience factory for a checkbox-enabled data list row.

text

the text displayed inside the row body

value

the record represented by the row

V

the value type represented by the row



Returns:

a new CheckableDataListItem instance

Public methods

public void onSelectionChanged(boolean selection)
Updates the checkbox state whenever the backing virtual item becomes selected or deselected.

selection

the current selected state for the row

public void setVirtualItem(VirtualItem<V, DataListItem<V>> virtualItem)
Associates the row with its virtual item and marks that item as selectable.

virtualItem

the virtual item that owns this rendered row

API Docs: DataFilter

Abstract methods

public boolean onSearch(T record, String token, boolean caseSensitive)
Determines whether a record should remain visible for the current search token.

record

the record being tested

token

the current user-entered search token

caseSensitive

whether the match should preserve case

API Docs: VirtualItem

Constructors

public void VirtualItem(T record, VirtualScrollItemMapper<T, I> mapper, KeyProvider<T> keyProvider)
Creates a virtual wrapper for a record and stores the mapper and key provider needed to materialize it on demand.

record

the underlying record

mapper

creates the rendered window item when needed

keyProvider

resolves stable keys for the wrapped record

Public methods

public VirtualItem<T, I> select(boolean silent)
Marks the wrapped record as selected and updates the rendered row if that row is currently materialized.

silent

true to suppress selection listeners

public VirtualItem<T, I> deselect(boolean silent)
Clears selection state for the wrapped record and updates the rendered row if present.

silent

true to suppress deselection listeners

public I windowItem()
Materializes the rendered window item the first time it is needed and binds it back to this virtual item.

Returns:

the rendered window item for the current record

public T getRecord()
Returns the wrapped backing record.

Returns:

the record associated with this virtual item

public VirtualItem<T, I> setSelectable(boolean selectable)
Controls whether the wrapped record can enter the selected state.

selectable

true when the record should be selectable

public String getKey()
Returns the stable key resolved by the configured key provider.

Returns:

the key that identifies this virtual item

API Docs: ScrollingWindowList

Constructors

public void ScrollingWindowList(VirtualScrollItemMapper<T, I> mapper, KeyProvider<T> keyProvider, ScrollingListWindowListener<T, I> listener)
Creates a window manager that can materialize records, resolve keys, and report window lifecycle events.

mapper

maps records into rendered window items

keyProvider

resolves stable keys for the backing records

listener

receives enter, exit, add, and remove notifications

Public methods

public void setList(List<T> list, int windowSize)
Builds a virtual item list from raw records and initializes the visible window size.

list

the full backing record collection

windowSize

the number of records to keep inside the active window

public ListWindow<T, I> getWindow()
Returns a view over the currently visible window.

Returns:

the current visible window of rendered items

public void scroll(int offset)
Moves the active window forward or backward and emits enter and exit events for affected items.

offset

the number of records to move the window by

public void add(T item, int index)
Inserts a record into the backing list and updates the visible window if the insertion overlaps it.

item

the record to insert

index

the insertion position in the backing list

public void remove(int startIndex, int numberOfItems)
Removes a range of records and refreshes the visible window boundaries and enter and exit callbacks.

startIndex

the first index to remove

numberOfItems

how many records to remove

public List<VirtualItem<T, I>> getAll()
Returns the full virtual item collection managed by the window list.

Returns:

all virtual items, not just the visible subset

API Docs: VirtualScrollItemMapper

Abstract methods

public I map(T record)
Creates the rendered window item for a backing record when that record enters the visible viewport.

record

the record to render

API Docs: VirtualScrollPanel

Constructors

public void VirtualScrollPanel(VirtualScrollItemMapper<T, I> mapper, KeyProvider<T> keyProvider)
Creates the virtual scroll viewport and its backing ScrollingWindowList.

mapper

maps records into rendered items

keyProvider

resolves stable keys for the records in the viewport

Public methods

public C setItems(List<T> items)
Measures the row height from the provided data, configures the scroll container, and initializes the backing window list.

items

the full record collection to virtualize

public C updateItems(List<VirtualItem<T, I>> items)
Replaces the active virtual item set without remeasuring row structure, which is useful for filtered views.

items

the virtual items that should back the current viewport

public C addOnListReadyListener(Consumer<C> listener)
Registers a callback that runs when the virtual list has been initialized and is ready for interaction.

listener

the callback to invoke once the list is ready

public C withBodyElement(ChildHandler<C, DivElement> handler)
Exposes the body element that holds rendered viewport items for advanced customization.

handler

receives the panel and its body element

public ScrollingWindowList<T, I> getWindowList()
Returns the window manager used by the panel.

Returns:

the backing ScrollingWindowList instance

public int getItemHeight()
Returns the measured row height used to size and recycle the virtual viewport.

Returns:

the item height in pixels

We are a group of passionate people who love what we do

Donate & Support Us