Getting the AjaxTarget
is done like this:
AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class);
Unfortunately, like expected, I can't add components to the target once I'm in the rendering phase. But Wicket provides the interface ITargetRespondListener
with the method onTargetRespond(AjaxRequestTarget target)
. Here I can add anything I want to the target.