Java Code Examples for org.apache.wicket.ajax.AjaxRequestTarget#registerRespondListener()

The following examples show how to use org.apache.wicket.ajax.AjaxRequestTarget#registerRespondListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SuggestionViewPanel.java    From webanno with Apache License 2.0 5 votes vote down vote up
/**
 * Schedules a rendering call via at the end of the given AJAX cycle. This method can be called
 * multiple times, even for the same annotation editor, but only resulting in a single rendering
 * call.
 */
private final void requestRender(AjaxRequestTarget aTarget, BratVisualizer aVis)
{
    aTarget.registerRespondListener(new AjaxComponentRespondListener(aVis, _target -> {
        // Is a document loaded?
        if (isBlank(aVis.getDocumentData())) {
            return;
        }

        aVis.render(_target);
    }));
}
 
Example 2
Source File: AnnotationEditorBase.java    From webanno with Apache License 2.0 5 votes vote down vote up
/**
 * Schedules a rendering call via at the end of the given AJAX cycle. This method can be
 * called multiple times, even for the same annotation editor, but only resulting in a single
 * rendering call.
 */
public final void requestRender(AjaxRequestTarget aTarget)
{
    aTarget.registerRespondListener(new AjaxComponentRespondListener(this, _target -> {
        // Is a document loaded?
        if (getModelObject().getDocument() == null) {
            return;
        }

        render(_target);
    }));
}
 
Example 3
Source File: AnnotationPage.java    From webanno with Apache License 2.0 5 votes vote down vote up
private void updateUrlFragment(AjaxRequestTarget aTarget)
{
    // No AJAX request - nothing to do
    if (aTarget == null) {
        return;
    }
    
    aTarget.registerRespondListener(new UrlFragmentUpdateListener());
}