You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alastair Maw (JIRA)" <ji...@apache.org> on 2007/06/18 12:11:26 UTC

[jira] Resolved: (WICKET-664) Allow users to hook into onbeforeunload event so they can tell when a page is closed in the browser

     [ https://issues.apache.org/jira/browse/WICKET-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alastair Maw resolved WICKET-664.
---------------------------------

    Resolution: Fixed

> Allow users to hook into onbeforeunload event so they can tell when a page is closed in the browser
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-664
>                 URL: https://issues.apache.org/jira/browse/WICKET-664
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>            Reporter: Alastair Maw
>            Assignee: Alastair Maw
>            Priority: Minor
>             Fix For: 1.3.0-beta2
>
>
> IHeaderResponse should have a method:
> public void renderOnBeforeUnloadJavascript(String javascript);
> Such that you can go:
> add(new AbstractDefaultAjaxBehavior() {
>      public void renderHead(IHeaderResponse response) {
>          super.renderHead(response);
>          response.renderOnBeforeUnloadJavascript(
>              getCallbackScript(false).toString()
>          );
>      }
>      protected void respond(AjaxRequestTarget target) {
>          // Do stuff here.
>      }
> });

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.