private void actionCompletePreferencesChange(AjaxRequestTarget aTarget) { try { AnnotatorState state = getModelObject(); JCas jCas = getEditorCas(); // The number of visible sentences may have changed - let the state recalculate // the visible sentences Sentence sentence = selectByAddr(jCas, Sentence.class, state.getFirstVisibleUnitAddress()); state.setFirstVisibleUnit(sentence); // The selection of layers may have changed. Update the dropdown detailEditor.getAnnotationFeatureForm().updateLayersDropdown(); AnnotationEditorBase newAnnotationEditor = createAnnotationEditor(); annotationEditor.replaceWith(newAnnotationEditor); annotationEditor = newAnnotationEditor; // Reload all AJAX-enabled children of the page but not the page itself! WicketUtil.refreshPage(aTarget, getPage()); } catch (Exception e) { LOG.info("Error reading CAS: {}", e.getMessage()); error("Error reading CAS " + e.getMessage()); aTarget.addChildren(getPage(), IFeedback.class); } }
private void actionCompletePreferencesChange(AjaxRequestTarget aTarget) { AnnotatorState state = CurationPage.this.getModelObject(); // Re-render the whole page because the width of the sidebar may have changed aTarget.add(CurationPage.this); aTarget.add(getOrCreatePositionInfoLabel()); JCas mergeCas = null; try { aTarget.add(getFeedbackPanel()); mergeCas = curationDocumentService.readCurationCas(state.getDocument()); // The number of visible sentences may have changed - let the state recalculate // the visible sentences Sentence sentence = selectByAddr(mergeCas, Sentence.class, state.getFirstVisibleUnitAddress()); state.setFirstVisibleUnit(sentence); curationPanel.updatePanel(aTarget, curationContainer); updatePanel(curationContainer, aTarget); updateSentenceNumber(mergeCas, state.getFirstVisibleUnitAddress()); } catch (Exception e) { handleException(aTarget, e); } }
private void actionCompletePreferencesChange(AjaxRequestTarget aTarget) { AnnotatorState state = CurationPage.this.getModelObject(); // Re-render the whole page because the width of the sidebar may have changed aTarget.add(CurationPage.this); aTarget.add(getOrCreatePositionInfoLabel()); JCas mergeCas = null; try { aTarget.add(getFeedbackPanel()); mergeCas = curationDocumentService.readCurationCas(state.getDocument()); // The number of visible sentences may have changed - let the state recalculate // the visible sentences Sentence sentence = selectByAddr(mergeCas, Sentence.class, state.getFirstVisibleUnitAddress()); state.setFirstVisibleUnit(sentence); curationPanel.updatePanel(aTarget, curationContainer); updatePanel(curationContainer, aTarget); updateSentenceNumber(mergeCas, state.getFirstVisibleUnitAddress()); } catch (Exception e) { handleException(aTarget, e); } }
state.getFirstVisibleUnitAddress()); state.setFirstVisibleUnit(sentence);
private void actionCompletePreferencesChange(AjaxRequestTarget aTarget) { try { AnnotatorState state = getModelObject(); JCas editorCas = getEditorCas(); // The number of visible sentences may have changed - let the state recalculate // the visible sentences Sentence sentence = selectByAddr(editorCas, Sentence.class, state.getFirstVisibleUnitAddress()); state.setFirstVisibleUnit(sentence); SuggestionBuilder builder = new SuggestionBuilder(casStorageService, documentService, correctionDocumentService, curationDocumentService, annotationService, userRepository); curationContainer = builder.buildCurationContainer(state); setCurationSegmentBeginEnd(editorCas); curationContainer.setBratAnnotatorModel(state); update(aTarget); aTarget.appendJavaScript( "Wicket.Window.unloadConfirmation = false;window.location.reload()"); // Re-render the whole page because the width of the sidebar may have changed aTarget.add(this); } catch (Exception e) { handleException(aTarget, e); } }
state.getFirstVisibleUnitAddress()); state.setFirstVisibleUnit(sentence);
curationPanel.getEditor().reset(aTarget); updatePanel(curationContainer, aTarget); updateSentenceNumber(mergeJCas, state.getFirstVisibleUnitAddress()); curationPanel.init(aTarget, curationContainer);
curationPanel.getEditor().reset(aTarget); updatePanel(curationContainer, aTarget); updateSentenceNumber(mergeJCas, state.getFirstVisibleUnitAddress()); curationPanel.init(aTarget, curationContainer);