ICEfaces
  1. ICEfaces
  2. ICE-8740

ESRI map script + icefaces-compat.jar causes JS error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.3
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      IF 3.2
    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description


      User is attempting to add ESRI mapping script to their IF 3.0 EE applicatio=
      n but are running into the following javascript issue:=20

      Uncaught TypeError: Object function (node,_40a){return on(node,type,functio=
      n(evt){if(!dom.isDescendant(evt.relatedTarget,_408?evt.target:node)){return=
       _40a.call(this,evt);}});} has no method 'include'

      icefaces-compat.uncompressed.js:4699
      =E2=80=A6=E2=80=A6..

      This issue has been confirmed on IF 3.2 final and only occurs when icefaces=
      -compat.jar is included. Attached is a test case that shows the issue.=20

        Activity

        Migration created issue -
        Hide
        Tyler Johnson added a comment - - edited

        The issue looks to be that the <div> tag is being defined with an =E2=80=9C=
        on=E2=80=9D method
        [Object, HTMLDivElement]
        [+] on function()

        {var a=3Dupdate([this],arguments);return __method.apply(n= ull,a);}

        Object, (Function)
        =20
        The icefaces-compat.js script blows up on line #5063
        if(eventName.include(":")){
        =20
        =20

        Show
        Tyler Johnson added a comment - - edited The issue looks to be that the <div> tag is being defined with an =E2=80=9C= on=E2=80=9D method [Object, HTMLDivElement] [+] on function() {var a=3Dupdate([this],arguments);return __method.apply(n= ull,a);} Object, (Function) =20 The icefaces-compat.js script blows up on line #5063 if(eventName.include(":")){ =20 =20
        Hide
        Mircea Toma added a comment - - edited

        It looks like there is a conflict between Prototype code (included in icefa=
        ces-compat.js) and ESRI code when defining Element.on function. ESRI code i=
        s calling the Element.on function with a different set of parameters than w=
        hat the function expect. As you can see in the screenshot the call stack sh=
        ows clearly how the second parameter is a function while the Prototype's El=
        ement.on function definition expects a string that represent the event type=
        (such as 'onclick').

        Show
        Mircea Toma added a comment - - edited It looks like there is a conflict between Prototype code (included in icefa= ces-compat.js) and ESRI code when defining Element.on function. ESRI code i= s calling the Element.on function with a different set of parameters than w= hat the function expect. As you can see in the screenshot the call stack sh= ows clearly how the second parameter is a function while the Prototype's El= ement.on function definition expects a string that represent the event type= (such as 'onclick').
        Migration made changes -
        Field Original Value New Value
        Reporter Migration [ remote ] Tyler Johnson [ tyler.johnson ]
        Migration made changes -
        Assignee Mircea Toma [ mircea.toma ]
        Fix Version/s EE-3.2.0.GA [ 10332 ]
        Assignee Priority P1 [ 10010 ]
        Migration made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Migration made changes -
        Fix Version/s 3.3 [ 10370 ]
        Migration made changes -
        Attachment sf-11702.war [ 14990 ]
        Migration made changes -
        Attachment call stack.jpg [ 14996 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.2.0.BETA [ 10573 ]
        Hide
        Ken Fyten added a comment -

        Further details from the customer indicate that The ESRI ArcGIS v2.8 product does work with ICEfaces, but their attempt to use the ArcGIS v3.2 release fails with an apparent JS conflict, potentially between ICEfaces and the Dojo library used by ArcGIS.

        Need to analyze the nature of the conflict when using ArcGIS 3.2 and ICEfaces 3.2.

        Show
        Ken Fyten added a comment - Further details from the customer indicate that The ESRI ArcGIS v2.8 product does work with ICEfaces, but their attempt to use the ArcGIS v3.2 release fails with an apparent JS conflict, potentially between ICEfaces and the Dojo library used by ArcGIS. Need to analyze the nature of the conflict when using ArcGIS 3.2 and ICEfaces 3.2.
        Ken Fyten made changes -
        Fix Version/s EE-3.2.0.GA [ 10332 ]
        Fix Version/s EE-3.2.0.BETA [ 10573 ]
        Ken Fyten made changes -
        Resolution Invalid [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Mircea Toma made changes -
        Comment [    =20 ]
        Hide
        Mircea Toma added a comment -

        My previous analysis stands as correct. Both in ICEfaces3 and ICEfaces1.8 the Prototype library is attaching the "on" method to the elements that it wraps. A method with the same name is registered by ESRI but it is overritten by Prototype, causing ESRI to fail when invoking the wrong method implementation.

        Show
        Mircea Toma added a comment - My previous analysis stands as correct. Both in ICEfaces3 and ICEfaces1.8 the Prototype library is attaching the "on" method to the elements that it wraps. A method with the same name is registered by ESRI but it is overritten by Prototype, causing ESRI to fail when invoking the wrong method implementation.
        Hide
        Mircea Toma added a comment -

        Attach patch for ICEFaces 1.8 code that renames the on method to prototype_on to avoid the name conflict.

        Show
        Mircea Toma added a comment - Attach patch for ICEFaces 1.8 code that renames the on method to prototype_on to avoid the name conflict.
        Mircea Toma made changes -
        Attachment ICE-8740.patch [ 15482 ]
        Mircea Toma made changes -
        Assignee Mircea Toma [ mircea.toma ] Ken Fyten [ ken.fyten ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33708 Thu Feb 28 14:22:54 MST 2013 mircea.toma ICE-8740 Renamed 'on' method wired (by Prototype lib) to DOM nodes to "prototype_on" to avoid conflict with AEGIS library.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/javascript/prototype/prototype.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33709 Thu Feb 28 14:26:26 MST 2013 mircea.toma ICE-8740 Renamed 'on' method wired (by Prototype lib) to DOM nodes to "prototype_on" to avoid conflict with AEGIS library.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/prototype/dom.js
        Hide
        Mircea Toma added a comment - - edited

        Renamed 'on' method wired (by Prototype lib) to DOM nodes to "prototype_on" to avoid conflict with AEGIS library.
        Applied fix to ICEfaces 1.8 trunk and ICEfaces3 trunk.

        Show
        Mircea Toma added a comment - - edited Renamed 'on' method wired (by Prototype lib) to DOM nodes to "prototype_on" to avoid conflict with AEGIS library. Applied fix to ICEfaces 1.8 trunk and ICEfaces3 trunk.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Tyler Johnson made changes -
        Salesforce Case Reference 5007000000OCgxmAAD
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Ken Fyten
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: