ICEfaces
  1. ICEfaces
  2. ICE-8579

Add de-registration methods for: onBeforeSubmit, onBeforeUpdate, onAfterUpdate, onSessionExpiry, onNetworkError, onServerError

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.3
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      ICEfaces3
    • Assignee Priority:
      P3
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description


      When ace:submitMonitor and ice:outputConnectionStatus register for the connection listeners, there's no means for them to de-register from the listeners, when the components clean themselves up when they're removed from the page. This causes a memory leak, and requires the listener methods to flag themselves as defunct, so they'll just return when called, instead of simply being de-registered.

        Activity

        Migration created issue -
        Hide
        Ken Fyten added a comment - - edited

        This is required to provide optimal memory management for components, particularly in cases where a single page interface is used over a long duration without navigating between pages.

        Show
        Ken Fyten added a comment - - edited This is required to provide optimal memory management for components, particularly in cases where a single page interface is used over a long duration without navigating between pages.
        Migration made changes -
        Field Original Value New Value
        Reporter Migration [ remote ] Mark Collette [ mark.collette ]
        Migration made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Assignee Mircea Toma [ mircea.toma ]
        Fix Version/s 3.2 [ 10338 ]
        Affects Documentation (User Guide, Ref. Guide, etc.) [ 10003 ]
        Assignee Priority P2 [ 10011 ]
        Component/s Bridge [ 10011 ]
        Component/s Components [ 10012 ]
        Migration made changes -
        Assignee Priority P2 [ 10011 ] P3 [ 10012 ]
        Hide
        Migration added a comment -

        This is required to provide optimal memory management for components, particularly in cases where a single page interface is used over a long duration without navigating between pages.

        Show
        Migration added a comment - This is required to provide optimal memory management for components, particularly in cases where a single page interface is used over a long duration without navigating between pages.
        Ken Fyten made changes -
        Fix Version/s 3.3 [ 10370 ]
        Fix Version/s 3.2 [ 10338 ]
        Hide
        Mark Collette added a comment -

        Another possible solution is to have variants of these methods where the callback is invoked just once, and automatically de-registered. Then the callback could simply re-add itself in itself, if it wanted to continue getting called.

        Show
        Mark Collette added a comment - Another possible solution is to have variants of these methods where the callback is invoked just once, and automatically de-registered. Then the callback could simply re-add itself in itself, if it wanted to continue getting called.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33375 Mon Feb 11 09:51:39 MST 2013 mircea.toma ICE-8579 Modified callback registration functions to return un-registering callback function. When this function is invoked the corresponding callback is removed from the list of registered callbacks.
        Files Changed
        Commit graph MODIFY /projects/bridge-support/src/main/javascript/collection.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/application.js
        Hide
        Mircea Toma added a comment - - edited

        Modified callback registration functions to return un-registering callback function. When this function is invoked the corresponding callback is removed from the list of registered callbacks.

        For example:

        //register callback
        var removeNetworkErrorNotifier = ice.onNetworkError(function() {
          console.error('we have a network error');
        });
        .....
        .....
        //de-registered callback
        removeNetworkErrorNotifier();
        
        Show
        Mircea Toma added a comment - - edited Modified callback registration functions to return un-registering callback function. When this function is invoked the corresponding callback is removed from the list of registered callbacks. For example: //register callback var removeNetworkErrorNotifier = ice.onNetworkError( function () { console.error('we have a network error'); }); ..... ..... //de-registered callback removeNetworkErrorNotifier();
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: