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

        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').
        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.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: