super.beforeRender(component);
AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
if (target != null) {
JQHeaderContributionTarget ajaxTarget = new JQHeaderContributionTarget();
contributeInternal(ajaxTarget);
for (IJQStatement s : ajaxTarget
.getJQStatementsInsideDocumentReady()) {
target.appendJavaScript(String.valueOf(s));
}
}
}