AjaxLink link = (AjaxLink)linkComponent;
setupRequestAndResponse();
RequestCycle requestCycle = createRequestCycle();
AjaxRequestTarget target = new AjaxRequestTarget();
requestCycle.setRequestTarget(target);
link.onClick(target);
// process the request target
target.respond(requestCycle);
}
// AjaxFallbackLinks is processed like an AjaxLink if isAjax is true
// If it's not handling of the linkComponent is passed through to the
// Link.
else if (linkComponent instanceof AjaxFallbackLink && isAjax)
{
AjaxFallbackLink link = (AjaxFallbackLink)linkComponent;
setupRequestAndResponse();
RequestCycle requestCycle = createRequestCycle();
AjaxRequestTarget target = new AjaxRequestTarget();
requestCycle.setRequestTarget(target);
link.onClick(target);
// process the request target
target.respond(requestCycle);
}
// if the link is an AjaxSubmitLink, we need to find the form
// from it using reflection so we know what to submit.
else if (linkComponent instanceof AjaxSubmitLink)
{