FilterComponent
The FilterComponent is a powerful filter component that can be used to search and filter all tables and list components. The end user can click together the filter conditions independently at runtime. To do this, you only have to link the FilterComponent to a grid by selecting the desired grid in Properties > Connected Grid.
The FilterComponent can be used as follows:
-
Drag a grid into the GUI builder
-
Drag an entity onto the grid
-
Insert the FilterComponent over the grid
-
Click Property > Data > ConnectedGrid for the FilterComponent in the Properties view.
-
In the following dialog you can select the desired grid
Filtering subentities:
To filter by subentities (e.g. by categories of a product) a subset dataprovider must be added as follows:
// Hier einfach einen SubsetDataProvider erstellen und befüllen für den Unterentity-Typ, nach dem auch gefiltert werden darf.
this.filterComponent.addSubsetDataProvider(
Category.class,
SubsetDataProvider.New(new CategoryDAO().findAll())
);
Important properties:
-
CaseSensitive - Specifies whether the search is case sensitive.
-
Connected Grid - The grid which should filter the FilterComponent. Connected Grid > Searchable Properties - The properties of the entity of the grid that can be searched for in the search bar. Connected Grid > Filterable Properties - the properties of the entity of the grid for which the user can create filters.