use of de.tudarmstadt.ukp.clarin.webanno.api.annotation.page.AnnotationPageBase in project webanno by webanno.
the class AutoOpenDialogBehavior method respond.
@Override
protected void respond(AjaxRequestTarget aTarget) {
AnnotationPageBase page = (AnnotationPageBase) getComponent().getPage();
// trying to open it.
if (page.getModelObject().getDocument() != null) {
return;
}
page.getModelObject().getSelection().clear();
page.getFooterItems().getObject().stream().filter(component -> component instanceof OpenDocumentDialog).map(component -> (OpenDocumentDialog) component).findFirst().ifPresent(dialog -> dialog.show(aTarget));
}
Aggregations