Search in sources :

Example 1 with LookupComponent

use of io.jmix.ui.screen.LookupComponent in project jmix by jmix-framework.

the class ScreensHelper method checkWindowType.

protected boolean checkWindowType(Class<? extends FrameOwner> controllerClass, ScreenType filterScreenType) {
    if (ScreenType.ALL.equals(filterScreenType)) {
        return true;
    }
    EditedEntityContainer editedAnnotation = controllerClass.getAnnotation(EditedEntityContainer.class);
    LookupComponent lookupAnnotation = controllerClass.getAnnotation(LookupComponent.class);
    if (ScreenType.EDITOR.equals(filterScreenType) && editedAnnotation != null) {
        return true;
    }
    return ScreenType.BROWSER.equals(filterScreenType) && lookupAnnotation != null;
}
Also used : EditedEntityContainer(io.jmix.ui.screen.EditedEntityContainer) LookupComponent(io.jmix.ui.screen.LookupComponent)

Aggregations

EditedEntityContainer (io.jmix.ui.screen.EditedEntityContainer)1 LookupComponent (io.jmix.ui.screen.LookupComponent)1