Interface PaginationItemRenderer<T>
- Type Parameters:
T- the element type served by the pagination's page source
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Renders one element of the current page into a component builder. The engine invokes the
renderer once per element on every repaint of the pagination area, always on the main
thread, handing it a fresh
ItemComponentBuilder that is materialized into a
single-slot component afterwards — displayIf, updateOnStateChange,
onClick, cancelOnClick, closeOnClick and openOnClick behave
exactly as on statically declared components.
The renderer must declare an item source via item(...). A renderer that throws,
or declares no item source, is logged rate-limited and the slot keeps its previous content
entirely (item and click handlers); on a first paint with no previous content the
pagination's fallback item is painted instead.
-
Method Summary
Modifier and TypeMethodDescriptionvoidrender(@NotNull ViewContext context, @NotNull ItemComponentBuilder item, int index, T value) Renders one page element.
-
Method Details
-
render
void render(@NotNull @NotNull ViewContext context, @NotNull @NotNull ItemComponentBuilder item, int index, @NotNull T value) Renders one page element.- Parameters:
context- the context of the session being painteditem- the fresh component builder to declare the element onindex- the ZERO-BASED position of the element within the CURRENT page — not the global element indexvalue- the element value served by the page source
-