1. Domino UI
  2. Data table
  3. Record details
Top Record details Docs

Record details

The RecordDetailsPlugin class is a DataTable plugin that allows expanding and collapsing rows to display additional details within the DataTable. It provides functionality to add expand/collapse buttons to utility columns and handle expand/collapse events.

T

The type of data in the DataTable rows.

See also :

Examples

Record details Show more details for a table record.

API Docs: RecordDetailsPlugin

Constructors

public void RecordDetailsPlugin(CellRenderer<T> cellRenderer)
Creates a new RecordDetailsPlugin with the provided cell renderer.

cellRenderer

The cell renderer used to render details content.

public void RecordDetailsPlugin(RecordDetailsRenderer<T> cellRenderer)
Creates a new RecordDetailsPlugin with the provided cell renderer.

cellRenderer

The cell renderer used to render details content.

public void RecordDetailsPlugin(CellRenderer<T> cellRenderer, Supplier<Icon<?>> expandIcon, Supplier<Icon<?>> collapseIcon)
Creates a new RecordDetailsPlugin with the provided cell renderer and custom expand and collapse icons.

cellRenderer

The cell renderer used to render details content.

expandIcon

A supplier of the expand icon.

collapseIcon

A supplier of the collapse icon.

public void RecordDetailsPlugin(RecordDetailsRenderer<T> cellRenderer, Supplier<Icon<?>> expandIcon, Supplier<Icon<?>> collapseIcon)
Creates a new RecordDetailsPlugin with the provided cell renderer and custom expand and collapse icons.

cellRenderer

The cell renderer used to render details content.

expandIcon

A supplier of the expand icon.

collapseIcon

A supplier of the collapse icon.

Public methods

public boolean requiresUtilityColumn()
Indicates whether this plugin requires a utility column in the DataTable. It returns true since it adds expand/collapse buttons to utility columns.

Returns:

true since this plugin requires a utility column.

public Optional<List<HTMLElement>> getUtilityElements(DataTable<T> dataTable, RowCell<T> cell)
Returns a list of utility elements to be added to utility columns for a specific cell.

dataTable

The DataTable to which this plugin is applied.

cell

The cell information containing the cell content and metadata.



Returns:

An optional list of utility elements, empty if none.

public void onHeaderAdded(DataTable<T> dataTable, ColumnConfig<T> column)
Handles the addition of headers to the DataTable. In this case, it adds the expand icon to the utility column header.

dataTable

The DataTable to which this plugin is applied.

column

The column configuration to which the header is added.

public void onBeforeAddHeaders(DataTable<T> dataTable)
Called before adding headers to the DataTable. It initializes the DataTable instance.

dataTable

The DataTable to which this plugin is applied.

public void handleEvent(DominoEvent event)
Handles table events, specifically handling the expand/collapse events.

event

The table event to be handled.

public DivElement getDetailsElement()
Gets the details element.

Returns:

The details element.

public TDElement getTd()
Gets the TD element.

Returns:

The TD element.

public TableRowElement getTr()
Gets the TR element.

Returns:

The TR element.

public void applyStyles(RowCell<T> cellInfo)
Applies styles to a cell based on the cell information.

cellInfo

The cell information containing the cell content and metadata.

public void setupColumn(ColumnConfig<T> column)
Sets up a column with the specified configuration.

column

The column configuration to set up.

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

Donate & Support Us