private void updateUrlFragment(AjaxRequestTarget aTarget) { if (aTarget != null) { AnnotatorState state = getModelObject(); UrlFragment fragment = new UrlFragment(aTarget); // Current project fragment.putParameter(PAGE_PARAM_PROJECT_ID, state.getDocument().getProject().getId()); // Current document fragment.putParameter(PAGE_PARAM_DOCUMENT_ID, state.getDocument().getId()); // Current focus unit if (state.getFocusUnitIndex() > 0) { fragment.putParameter(PAGE_PARAM_FOCUS, state.getFocusUnitIndex()); } else { fragment.removeParameter(PAGE_PARAM_FOCUS); } // If we do not manually set editedFragment to false, then changing the URL // manually or using the back/forward buttons in the browser only works every // second time. Might be a but in wicketstuff urlfragment... not sure. aTarget.appendJavaScript( "try{if(window.UrlUtil){window.UrlUtil.editedFragment = false;}}catch(e){}"); } }
if (curationViewItem.getSentenceNumber() == state.getFocusUnitIndex()) { aTag.append("class", "current", " ");
if (curationViewItem.getSentenceNumber() == state.getFocusUnitIndex()) { aTag.append("class", "current", " ");
document != null && document.equals(getModelObject().getDocument()) && focus == getModelObject().getFocusUnitIndex() ) { return;
document != null && document.equals(getModelObject().getDocument()) && focus == getModelObject().getFocusUnitIndex() ) { return;
+ state.getFirstVisibleUnitIndex() + "] l:[" + state.getLastVisibleUnitIndex() + "] s:[" + state.getFocusUnitIndex() + "]");
+ state.getLastVisibleUnitIndex() + "] s:[" + state.getFocusUnitIndex() + "]");
document != null && document.equals(getModelObject().getDocument()) && focus == getModelObject().getFocusUnitIndex() ) { return;
+ state.getFirstVisibleUnitIndex() + "] l:[" + state.getLastVisibleUnitIndex() + "] s:[" + state.getFocusUnitIndex() + "]");
+ state.getFirstVisibleUnitIndex() + "] l:[" + state.getLastVisibleUnitIndex() + "] s:[" + state.getFocusUnitIndex() + "]");