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;
}
Aggregations