How to change Filter propertyFilters date format, screen Id, etc?

I have a filter as follows:
image

How can I customize a TextField property filters date format to yyyy-MM-dd?

How can I customize a entityPicker property filter to have a custom screen Id as opposed to the default screen Id for a given entity?

I didn’t see anything in the documentation about this and I couldn’t quite figure it out from API documentation.

Thank you.

Hi,

I’m afraid, the components that you add dynamically to the filter don’t support such configuration.

You may add any components that you need for filtering outside the Filter component - it will be a kind of predefined filter. You may create a regular hbox, put your components there and then link the components with the data loader as described in the DataLoadCoordinator documentation.

Instead of regular UI components you may put components into you custom filtering container. propertyFilter component allows you to define a UI component that will be used for values inside it, e.g.

<propertyFilter property="project" operation="EQUAL" dataLoader="tasksDl">
     <entityComboBox metaClass="tm_Project" optionsContainer="projectsDc"/>
</propertyFilter>

Hi,

Today In my conversion Cuba <> Jmix, i will need access filter compoments to apply interract between them.
exemple :
if one change custom prompt of other …
Change combox mode to show all entities with scroll bar … etc

In Cuba I can access compoment by ParamEditor.class who keep link components.

In your exemple How jpqlFilter can interact with propertyFilter? could your provide us an exemple?

In waiting this part of code permit me to find real component

<propertyFilter
                            caption="pays"
                            operation="EQUAL"
                            parameterName="pays"
                            property="masterData.identite.pays">
                        <entityComboBox metaClass="mdm_Pays" optionsContainer="paysDc"/>
                    </propertyFilter>
final EntityComboBox<Pays> paysSearchField = FilterUtils.getFilterComponent(this.filter,
                "pays", EntityComboBox.class);
        paysSearchField.setPageLength(0);
public static <T> T getFilterComponent(final Filter filter, final String filterComponentName, final Class<T> compomentClass) {
        final GroupFilter groupFilter = (GroupFilter) (((FilterImpl) filter).getComposition()).getComponents().stream()
                .filter(elem -> GroupFilter.class.isAssignableFrom(elem.getClass()))
                .findFirst().orElse(null);
        if (null == groupFilter) {
            // Filter not set
            return null;
        }

        final SingleFilterComponent singleFilterComponent = (SingleFilterComponent) groupFilter.getFilterComponents()
                .stream()
                .filter(filterComponent -> SingleFilterComponent.class.isAssignableFrom(filterComponent.getClass()) &&
                        ((SingleFilterComponent) filterComponent).getParameterName().equals(filterComponentName))
                .findFirst().orElse(null);
        if (null == groupFilter) {
            // Filter element not found
            return null;
        }

        return (T) singleFilterComponent.getValueComponent();
    }

result

I think JMIX will be provide us a better solution,

regards

gabriel