ICEfaces
  1. ICEfaces
  2. ICE-7899

REGRESSION: EE Composite Showcase fails with JS error on IE7/8

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.0.0.BETA
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces EE 3.0.0, regression as of commit svn rvn # 28277

      Description

      The commit for ICE-7781 is resulting in JS errors being thrown by the EE Composite Showcase application when run with MyFaces (Mojarra is fine).

      ICEfaces-ee/trunk/icefaces-ee rev. 30763
      Server: Tomcat 7.0.0 (icepc13)/7.0.8 (local)
      Browsers: IE7/8

      There is a JS error (IE8) or Runtime Error (IE7 /icepc13) when clicking on any of the left side links on the EE Component Showcase main page.
      No errors in IE9.

      IE8:
      Webpage error details
      User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDS; .NET4.0C)
      Timestamp: Wed, 14 Mar 2012 17:40:54 UTC

      Message: Object doesn't support this property or method
      Line: 1
      Char: 39412
      Code: 0
      URI: http://localhost:8080/ee-composite-showcase/javax.faces.resource/jsf.js.jsf?ln=javax.faces&v=766874567


      The offending commit is:

      28277 3/12/12 12:31 PM 1 mircea.toma ICE-7781 Changed PanelPopupRenderer to use JavascriptContext.addJavascriptCall method to send the JS code for auto-centering instead rendering the JS code in the component's markup. Using this approach we make sure the auto-centering is sent along every update of the popup.

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          The EE Composite Showcase sample can be build by:

          1. Checkout http://server.ice:8888/svn/repo/icefaces-ee3/trunk
          2. in the icefaces-ee dir, type "ant build.projects -Dmyfaces="true" "
          3. the resulting samples/dist/ee-composite-showcase.war can be deployed to tomcat to see the issue on IE7 or IE8.

          Show
          Ken Fyten added a comment - The EE Composite Showcase sample can be build by: 1. Checkout http://server.ice:8888/svn/repo/icefaces-ee3/trunk 2. in the icefaces-ee dir, type "ant build.projects -Dmyfaces="true" " 3. the resulting samples/dist/ee-composite-showcase.war can be deployed to tomcat to see the issue on IE7 or IE8.
          Hide
          Philip Breau added a comment -

          ICEfaces 3 Trunk:
          28324 3/14/12 3:30 PM 1 philip.breau ICE-7899

          ICEfaces 3 Maintenance:

          28323 3/14/12 3:16 PM 1 philip.breau add a semicolon before autocenter js

          Show
          Philip Breau added a comment - ICEfaces 3 Trunk: 28324 3/14/12 3:30 PM 1 philip.breau ICE-7899 ICEfaces 3 Maintenance: 28323 3/14/12 3:16 PM 1 philip.breau add a semicolon before autocenter js
          Hide
          Philip Breau added a comment -

          To clarify, the checkins for 28324 and 28323 were for an issue with the autocenter js and popups, and nothing to do with errors on IE.

          Show
          Philip Breau added a comment - To clarify, the checkins for 28324 and 28323 were for an issue with the autocenter js and popups, and nothing to do with errors on IE.
          Hide
          Mircea Toma added a comment -

          I used a version of the compat component before the fix for ICE-7781 was applied and I can still reproduce the issue.

          After debugging the code I pretty certain that the issue is in MyFaces JS code. The handling of the requests taken out of the queue is failing when currently extracted request is cleared prematurely:

          enqueue : function(request) {

          if (this._curReq == null)

          { this._curReq = request; this._curReq.send(); //*** this._curReq is undefined here, most probably it's been cleared in some other place }

          else {
          this._callSuper("enqueue", request);
          if (request._queueSize != this._size)

          { this.setQueueSize(request._queueSize); }

          }

          },

          Show
          Mircea Toma added a comment - I used a version of the compat component before the fix for ICE-7781 was applied and I can still reproduce the issue. After debugging the code I pretty certain that the issue is in MyFaces JS code. The handling of the requests taken out of the queue is failing when currently extracted request is cleared prematurely: enqueue : function(request) { if (this._curReq == null) { this._curReq = request; this._curReq.send(); //*** this._curReq is undefined here, most probably it's been cleared in some other place } else { this._callSuper("enqueue", request); if (request._queueSize != this._size) { this.setQueueSize(request._queueSize); } } },
          Hide
          Ken Fyten added a comment -

          Carmen says:

          The issue still exists in IE7 only (RunTime error when clicking on the left-side links).
          The IE8 JS error has been resolved.

          Show
          Ken Fyten added a comment - Carmen says: The issue still exists in IE7 only (RunTime error when clicking on the left-side links). The IE8 JS error has been resolved.
          Hide
          Mircea Toma added a comment -

          The previously mentioned Myfaces code is not quite the real problem, the issue was deeper in the call stack (within this._curReq.send() invocation). Myfaces is trying to broadcast the "BEGIN" submit event to all the registered callbacks, to do that Myfaces bridge is using Array.prototype.forEach method. Since IE8 does not implement that method the described error is thrown. There is Myfaces code that will define a non-native Array.prototype.forEach function but the code is loaded conditionally. Unfortunately the condition is not fulfilled in IE8.

          Show
          Mircea Toma added a comment - The previously mentioned Myfaces code is not quite the real problem, the issue was deeper in the call stack (within this._curReq.send() invocation). Myfaces is trying to broadcast the "BEGIN" submit event to all the registered callbacks, to do that Myfaces bridge is using Array.prototype.forEach method. Since IE8 does not implement that method the described error is thrown. There is Myfaces code that will define a non-native Array.prototype.forEach function but the code is loaded conditionally. Unfortunately the condition is not fulfilled in IE8.
          Hide
          Mircea Toma added a comment - - edited

          The attached fix modifies the condition for loading the code defining the non-native Array.prototype.forEach function.

          Show
          Mircea Toma added a comment - - edited The attached fix modifies the condition for loading the code defining the non-native Array.prototype.forEach function.
          Hide
          Deryk Sinotte added a comment -

          Committed a re-built version of MyFaces 2.1.6 that includes this patch to both the branch and the trunk.

          Show
          Deryk Sinotte added a comment - Committed a re-built version of MyFaces 2.1.6 that includes this patch to both the branch and the trunk.
          Hide
          Mircea Toma added a comment -

          Here's the issue opened in Myfaces' bug tracking system: https://issues.apache.org/jira/browse/MYFACES-3509

          Show
          Mircea Toma added a comment - Here's the issue opened in Myfaces' bug tracking system: https://issues.apache.org/jira/browse/MYFACES-3509
          Hide
          Ken Fyten added a comment -

          Changed to public.

          Show
          Ken Fyten added a comment - Changed to public.

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: