Class GridRenderer

java.lang.Object
com.vaadin.flow.component.ai.grid.GridRenderer
All Implemented Interfaces:
Serializable

public final class GridRenderer extends Object implements 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 Details

    • renderGrid

      public static void renderGrid(com.vaadin.flow.component.grid.Grid<AIDataRow> 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 runWhenAttached and UI.access()).

      Parameters:
      grid - the grid to render, not null
      databaseProvider - the database provider for query execution, not null
      query - the SQL SELECT query, not null