fullTextFilter

This component requires the free Search add-on.

fullTextFilter functions similarly to propertyFilter but performs full-text search across indexed entity fields.

XML Element

fullTextFilter

Java Class

FullTextFilter

Basics

Declare the search namespace in the view’s XML descriptor:

<view xmlns="http://jmix.io/schema/flowui/view"
      xmlns:search="http://jmix.io/schema/search/ui"
      title="msg://searchView.title">

Studio adds the namespace automatically when you add the component using the Add Component action in the top actions panel. See Component Palette.

Bind fullTextFilter to a collection data loader using the required dataLoader attribute. The following example declares the data, filter, and results grid:

<data>
    <collection id="ordersDc"
                class="com.company.demo.entity.Order">
        <loader id="ordersDl"
                readOnly="true">
            <query>
                <![CDATA[select e from Order_ e]]>
            </query>
        </loader>
        <fetchPlan extends="_base">
            <property name="customer"
                      fetchPlan="_base"/>
        </fetchPlan>
    </collection>
</data>
<facets>
    <dataLoadCoordinator auto="true"/>
</facets>
<layout>
    <search:fullTextFilter dataLoader="ordersDl"
                           autoApply="true"/>
    <dataGrid id="ordersDataGrid"
              width="100%"
              dataContainer="ordersDc">
        <columns>
            <column property="number"/>
            <column property="date"/>
            <column property="amount"/>
            <column property="product"/>
            <column property="customer"/>
        </columns>
    </dataGrid>
</layout>

The FullTextFilter component operates as follows:

  1. Performs a full-text search to find entity identifiers matching the search criteria.

  2. Appends a condition containing these identifiers to the associated dataLoader.

  3. When a DataGrid (or other listing component) is linked to this data loader, it displays only those records that match the full-text search criteria.

The full-text condition combines with any other filters applied to the data loader, providing refined result sets.

Validation

To check values entered into the fullTextFilter component, you can use a validator in a nested validators element.

The following predefined validators are available for fullTextFilter:

XML Element

validators

elements

custom - decimalMax - decimalMin - digits - doubleMax - doubleMin - email - future - futureOrPresent - max - min - negative - negativeOrZero - notBlank - notEmpty - notNull - past - pastOrPresent - positive - positiveOrZero - regexp - size

Attributes

The following attributes are specific to fullTextFilter:

Name Description Default

autoApply

When set to true, fullTextFilter automatically applies itself to the data loader when its value changes.

jmix.ui.component.filter-auto-apply

dataLoader

Sets the required data loader filtered by this component. It must be a collection loader.

labelPosition

Sets the position of the label relative to the filter value component. See propertyFilter label position.

labelWidth

Sets the label width as a CSS length. See propertyFilter label width.

searchStrategy

Determines the search strategy applied. See Search Strategies.

jmix.search.default-search-strategy

The following shared attributes are supported by fullTextFilter:

Handlers

The following handlers are specific to fullTextFilter:

Name Description

validator

Validates the component value.

The following shared handlers are supported by fullTextFilter:

Elements

A fullTextFilter can include tooltip and validator as its nested elements.