ICEfaces
  1. ICEfaces
  2. ICE-9221

ace:gMap, events are registered multiple times under certain scenarios

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any
    • Salesforce Case Reference:

      Description

      Depending on how the application uses ace:gMap and its subcomponents, it is possible to register the same event multiple times after dynamic updates.

      Here are two specific scenarios:
      * Whenever an ace:gMapEvent is rendered, it will cause an update, simply because the script contains the hash code of the object. The dom-diff detects this as an update and sends the new markup to the client, which registers the same event again. To fix this, it will be necessary to remove the hash code from the markup and also to keep track of the different events by id, in order to avoid registering them again.
      * With ace:gMapInfoWindow, the client-side code does an initial check to see if the window exists, and if it does, then it is closed, but the script continues setting up all the listeners, and if 'showOnClick' is true, then the parent marker will get registered an additional event listener to open the info window on click, causing multiple instances of the same window to be opened, stacke don top of each other.

      There might be other similar situations throughout the code, where events are registered multiple times. So, it will be necessary to examine the entire code to look for this kind of situations.

        Activity

        Hide
        Arturo Zambrano added a comment -

        Committed fixes at revision 34767. Fixed the two issues mentioned in the description and verified the rest of the code to detect situations of multiplicity. There don't seem to be other cases where this might occur, as most other subcomponents call a 'remove' method before registering a new functionality, or in some other cases there can only be one instance of such functionality (autocomplete, layers).

        Show
        Arturo Zambrano added a comment - Committed fixes at revision 34767. Fixed the two issues mentioned in the description and verified the rest of the code to detect situations of multiplicity. There don't seem to be other cases where this might occur, as most other subcomponents call a 'remove' method before registering a new functionality, or in some other cases there can only be one instance of such functionality (autocomplete, layers).

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: