@Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); if (!isStopped()) { // install an onunload handler response.renderJavascript("history.navigationMode = 'compatible';", "Opera onunload support"); response.renderOnEventJavascript("window", "unload", "wicketAjaxGet('" + getCallbackUrl().toString() + "&unload=1', function() { }, function() { });"); } } }
/** * {@inheritDoc} */ @Override public void renderHead(final Component c, final IHeaderResponse response) { super.renderHead(c, response); if (!isStopped()) { // install an on-unload handler response.render(JavaScriptHeaderItem.forScript("history.navigationMode = 'compatible';", "Opera on-unload support")); response.render(OnEventHeaderItem.forScript("window", "unload", "Wicket.Ajax.get({'u': '" + getCallbackUrl().toString() + "&unload=1'});")); } } }
protected void onTimer(final AjaxRequestTarget target) if (isStopped())
public <EventType> TimerPushNode<EventType> installNode(final Component component, final IPushEventHandler<EventType> handler, final Duration pollingInterval) { Args.notNull(component, "component"); Args.notNull(handler, "handler"); Args.notNull(pollingInterval, "pollingInterval"); TimerPushBehavior behavior = _findPushBehaviour(component); if (behavior != null && behavior.isStopped()) { component.remove(behavior); behavior = null; } if (behavior == null) { behavior = new TimerPushBehavior(pollingInterval); component.add(behavior); } final TimerPushNode<EventType> node = behavior.addNode(handler, pollingInterval); _onConnect(node); return node; }