GridJavaCore configuration
January 28, 2024 ยท View on GitHub
You can configure the settings of the grid with the parameters and methods of the GridServer objects. Remember that the GridClient object in the front-end client project and the GridServer object on the server project must have compatible settings.
GridServer parameters
| Parameter | Description | Example |
|---|---|---|
| entityManager | EntityManager object to create queries to the database | em |
| targetType | class of the object to be listed on the grid | Order.class |
| query | map containing all grid parameters | Must be the HttpServletRequest.getParameterMap() of the action controller |
| columns | lambda expression to define the columns included in the grid (Optional) | Columns lambda expression defined in the controller of the example |
| pageSize | integer to define the number of rows returned by the web service (Optional) | 10 |
GridServer methods
| Method name | Description | Example |
|---|---|---|
| autoGenerateColumns | Generates columns for all properties of the model using data annotations | GridServer |
| sortable | Enable or disable sorting for all columns of the grid | GridServer |
| searchable | Enable or disable searching on the grid | GridServer |
| filterable | Enable or disable filtering for all columns of the grid | GridServer |
| withPaging | Enable paging and setting the number of items to be shown | GridServer |
| setColumns | lambda expression to define the columns included in the grid | GridServer |
| setRemoveDiacritics | disable diacritics distinction on the database | GridServer |
| setPredicate | Query to get the initial elements of the grid | GridServer |
| setOrder | List of jakarta.persistence.criteria.Order for sorting the initial elements of the grid | GridServer |