Filter component is a versatile tool for filtering the data it is bound to.
The component enables quick data filtering by arbitrary conditions, as well as creating configurations for repeated use.
Filter should be connected to a data loader defined for a
KeyValueCollectionContainer. The loader should contain a JPQL query. The filter operates by modifying the query under the criteria provided by the user. Thus, filtering is done at the database level when the SQL query is executed, and only selected data is loaded to the Backoffice UI.
By default, Jmix Studio generates
Filter when creating an entity master-detail or entity browser screens.
A typical filter is shown below:
The Add search condition link (1).
The drop-down menu with the saved filters (2).
The Refresh button with the drop-down menu (3).
The operation selector (4).
The condition value field (5).
The filter settings popup button (6).
By default, the component is in quick filter mode. This means that a user can add a set of conditions for a one-off data search. After the screen is closed, the conditions will disappear.
To create a quick filter, click the Add search condition link. The Add condition screen will be displayed:
Possible condition types are described below:
Properties – attributes of this entity and related entities. Only persistent attributes are displayed. They should also either be explicitly set in the property element of the filter XML descriptor, or comply with the rules specified in the properties element. == Configuration