I ran into this tonight as well. Would it be possible to have James' code below, or a better version if it exists, added to AjaxTimerBehavior? I can't think of a case where this behavior would be undesirable. Let me know if I should file a JIRA.
James McLaughlin-3 wrote:
In case anyone is interested, you just need to override getCallbackScript :
@Override
protected CharSequence getCallbackScript(boolean
recordPageVersion)
{
String mId = getComponent().getMarkupId();
StringBuilder sb = new StringBuilder("exec_func(function() {
");
sb.append("var el = wicketGet('" + mId + "'); ");
sb.append("if(null != el) {");
sb.append(super.getCallbackScript(recordPageVersion));
sb.append("}");
sb.append("})");
return sb.toString();
}