Interface ListGridCellRenderer
public interface ListGridCellRenderer
Custom cell renderer for the ListGrid
component.
Custom cell content rendering is done by implementing this interface.
If the renderer class is set for a cell, the ListGrid
passes the data to the renderer class and displays the returned component in the cell, instead of displaying data directly.
If you want to display multiple components in the cell, the components must be enclosed in a container component and passed to the renderer method.
By implementing this interface, you are able to create a cell with multiple components, each one having multiple functionalities. E.g. place a button inside the cell and implement an event handler for it. You can also use a more complex component to visualize data or diagrams.
- Since:
- 4.0
- Author:
- JBStrap
-
Method Summary
Modifier and TypeMethodDescriptionComponent<?>
onRendering
(String columnName, Object data, Record record) Performs cell rendering.
-
Method Details
-
onRendering
Performs cell rendering. The method gets the cell name in a parameter, the cell value and the list grid row record. It returns a component that is displayed in the specific cell. If multiple components are displayed, the returned component must be enclosed in a container which contains all the components to be displayed.- Parameters:
columnName
- Column name to be rendereddata
- Cell data using the same type as retrieved from the databaserecord
- The entire row record The record specified here contains all list grid row data: all columns and hidden data. These can be used for the rendering.- Returns:
- The rendered component
If
null
is set, an empty cell is displayed.
-