GridJavaCore configuration

January 28, 2024 ยท View on GitHub

Index

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

ParameterDescriptionExample
entityManagerEntityManager object to create queries to the databaseem
targetTypeclass of the object to be listed on the gridOrder.class
querymap containing all grid parametersMust be the HttpServletRequest.getParameterMap() of the action controller
columnslambda expression to define the columns included in the grid (Optional)Columns lambda expression defined in the controller of the example
pageSizeinteger to define the number of rows returned by the web service (Optional)10

GridServer methods

Method nameDescriptionExample
autoGenerateColumnsGenerates columns for all properties of the model using data annotationsGridServer(...).autoGenerateColumns();
sortableEnable or disable sorting for all columns of the gridGridServer(...).sortable(true);
searchableEnable or disable searching on the gridGridServer(...).searchable(true, true);
filterableEnable or disable filtering for all columns of the gridGridServer(...).filterable(true);
withPagingEnable paging and setting the number of items to be shownGridServer(...).withPaging(10);
setColumnslambda expression to define the columns included in the gridGridServer(...).setColumns(columns);
setRemoveDiacriticsdisable diacritics distinction on the databaseGridServer(...).setRemoveDiacritics("dbo.RemoveDiacritics");
setPredicateQuery to get the initial elements of the gridGridServer(...).setPredicate(cb.equal(root.get("orderID"), orderId));
setOrderList of jakarta.persistence.criteria.Order for sorting the initial elements of the gridGridServer(...).setOrder(sortingList)

<- Quick start | Paging ->