Unable to create filter on dto screen

How to create filters on dto entity browse screen same like other browse ui screen.

Filter UI component modifies JPQL query used for loading entities, so it won’t work with DTO entities. What you can do is to define your own filter, i.e. add a fixed number of fields to the screen and use its values when you load your DTO list.

For example, you have a screen where you display a list of Customer DTO. You may add two fields for filtering values: firstName and lastName:

        <groupBox id="filterBox" spacing="true" orientation="horizontal" caption="msg://filter" expand="spring">
            <label value="msg://firstName" align="MIDDLE_LEFT"/>
            <textField id="firstNameFilter" datatype="string"/>
            <label value="msg://lastName" align="MIDDLE_LEFT"/>
            <textField id="lastNameFilter" datatype="string"/>
            <button id="refreshBtn" caption="msg://refresh" icon="REFRESH"/>
            <hbox id="spring"/>

The DataLoader delegate should analyze these field values and load data using the filtering criteria:

public class CustomerBrowse extends StandardLookup<Customer> {

    private CustomerService customerService;

    private CollectionLoader<Customer> customersDl;

    private TextField<String> firstNameFilter;

    private TextField<String> lastNameFilter;

    @Install(to = "customersDl", target = Target.DATA_LOADER)
    private List<Customer> customersDlLoadDelegate(LoadContext<Customer> loadContext) {
        String firstNameFilterValue = firstNameFilter.getValue();
        String lastNameFilterValue = lastNameFilter.getValue();
        return customerService.loadCustomers(firstNameFilterValue, lastNameFilterValue);

    public void onRefreshBtnClick(Button.ClickEvent event) {

The sample demonstrating this approach: dto-filter-sample.zip (87.1 KB)

Thank you Maxim Gorbunkov for helping.

Hi @gorbunkov,
do you have any solution for sorting DTOs in a table?
Thanks! Reini