ICEfaces
  1. ICEfaces
  2. ICE-10482

Add new ice.onBeforeUnload JavaScript callback API

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.0
    • Fix Version/s: EE-4.0.0.GA
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      All

      Description

      Feature Request: A customer would like to be able to have a notification displayed when a user tries to close a browser window. This would be something to the effect of "Are you sure you want to close? [Yes] [No]"

      It is possible to do this via JavaScript but this will interfere with the functionality of ICEfaces features such as the blockUiOnSubmit.

      This JIRA is to investigate the possibility of adding a component or other method of doing this that will work well with other ICEfaces functionality.

        Activity

        Hide
        Mircea Toma added a comment - - edited

        It looks like this issue cannot be fixed. There is one important constraint that ICEfaces has which is to fire a dispose-window request on beforeUnload. This request cannot be fired on unload because the request is then issued after the page load request, properly confusing the WindowScopeManager. Now if during before unload event we collect at least one veto (against page unload) from the callbacks then we can stop the page unload by cancelling the beforeUnload event and also avoid to send the dispose-window request. But if the user confirms that he/she wants to unload the page there's nothing we can do anymore, sending the dispose-window during unload event would be too late.

        Show
        Mircea Toma added a comment - - edited It looks like this issue cannot be fixed. There is one important constraint that ICEfaces has which is to fire a dispose-window request on beforeUnload . This request cannot be fired on unload because the request is then issued after the page load request, properly confusing the WindowScopeManager . Now if during before unload event we collect at least one veto (against page unload) from the callbacks then we can stop the page unload by cancelling the beforeUnload event and also avoid to send the dispose-window request. But if the user confirms that he/she wants to unload the page there's nothing we can do anymore, sending the dispose-window during unload event would be too late.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: