Class GridRenderer
java.lang.Object
com.vaadin.flow.component.ai.grid.GridRenderer
- All Implemented Interfaces:
Serializable
Stateless utility for rendering grid data from SQL queries. Handles column
creation, type-based rendering, column grouping, and lazy loading via
CallbackDataProvider.- Author:
- Vaadin Ltd
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrenderGrid(Grid<Map<String, Object>> grid, DatabaseProvider databaseProvider, String query) Renders the grid with results from the given SQL query.
-
Method Details
-
renderGrid
public static void renderGrid(Grid<Map<String, Object>> grid, DatabaseProvider databaseProvider, String query) Renders the grid with results from the given SQL query. Columns are created dynamically from the query result, with type-appropriate renderers, grouping, and lazy loading.The caller is responsible for ensuring this method runs on the UI thread (e.g., via
runWhenAttachedandUI.access()).- Parameters:
grid- the grid to render, notnulldatabaseProvider- the database provider for query execution, notnullquery- the SQL SELECT query, notnull
-