Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JpqlFilter generation strategy ignores the entity-field-type application property #2516

Closed
KremnevDmitry opened this issue Nov 24, 2023 · 2 comments · Fixed by #2999
Closed
Assignees
Labels

Comments

@KremnevDmitry
Copy link
Contributor

KremnevDmitry commented Nov 24, 2023

Feature Description

See: https://forum.jmix.io/t/custom-filter-field/3884/11

It looks like there is no reason to hardcode the entityPicker creation here: io.jmix.ui.component.factory.JpqlFilterComponentGenerationStrategy#createEntityField.

Perhaps we should use:

    protected Component createEntityField(ComponentGenerationContext context) {
        JpqlFilterComponentGenerationContext cfContext = (JpqlFilterComponentGenerationContext) context;
        MetaClass metaClass = metadata.getClass(cfContext.getParameterClass());
        return (EntityPicker<?>) entityFieldCreationSupport.createEntityField(metaClass, context.getOptions());
    }

Probably related to: #746

@KremnevDmitry KremnevDmitry added in: ui ver: 1 Jmix version 1.x labels Nov 24, 2023
@KremnevDmitry KremnevDmitry changed the title JpqlFilter generation strategy ignores entity-field-type application property JpqlFilter generation strategy ignores the entity-field-type application property Nov 24, 2023
@KremnevDmitry KremnevDmitry added the candidate Possible candidate for future releases label Dec 18, 2023
@wwnjj13
Copy link

wwnjj13 commented Dec 27, 2023

Using the above code in my own jmix fork worked without a hitch. Just wanted to share that.

@SergeiAksenov2
Copy link

Tested on:
Jmix version: 1.6.999-SNAPSHOT
Jmix Studio plugin version: 2.2.SNAPSHOT6237-241
IntelliJ version: IntelliJ IDEA 2024.1 (Community Edition)

Entity-field-type application property are available in the next condition creation steps

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants