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

        Arturo Zambrano created issue -
        Arturo Zambrano made changes -
        Field Original Value New Value
        Assignee Arturo Zambrano [ artzambrano ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34563 Fri Apr 26 16:03:47 MDT 2013 art.zambrano ICE-9221 fix to avoid including the hash code of the component object in the script, but to simply render the class name alone
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapEventRenderer.java
        Arran Mccullough made changes -
        Salesforce Case Reference 5007000000T64cpAAB
        Ken Fyten made changes -
        Fix Version/s 3.4 [ 10770 ]
        Ken Fyten made changes -
        Component/s ACE-Components [ 10050 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34767 Tue May 07 10:08:41 MDT 2013 art.zambrano ICE-9241 modified renderers to use JSONBuilder; ICE-9221 fixes to prevent registering multiple info windows and multiple events
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapEventRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapInfoWindowRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapOverlayRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapServicesRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapControlRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/gmap/gmap.js
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapMarkerRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapLayerRenderer.java
        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).
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA [ 10572 ]
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: