Search in sources :

Example 1 with LookupComponent

use of com.haulmont.cuba.gui.screen.LookupComponent in project cuba by cuba-platform.

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(com.haulmont.cuba.gui.screen.EditedEntityContainer) LookupComponent(com.haulmont.cuba.gui.screen.LookupComponent)

Aggregations

EditedEntityContainer (com.haulmont.cuba.gui.screen.EditedEntityContainer)1 LookupComponent (com.haulmont.cuba.gui.screen.LookupComponent)1