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

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28324 Wed Mar 14 12:30:42 MDT 2012 philip.breau ICE-7899
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java
          Ken Fyten created issue -
          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.
          Ken Fyten made changes -
          Field Original Value New Value
          Salesforce Case []
          Assignee Priority P1
          Assignee Mircea Toma [ mircea.toma ]
          Ken Fyten made changes -
          Assignee Mircea Toma [ mircea.toma ] Philip.breau [ philip.breau ]
          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
          Philip Breau made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 3.0.1 [ 10282 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Philip.breau [ philip.breau ] Mircea Toma [ mircea.toma ]
          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.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28396 Mon Mar 19 10:32:06 MDT 2012 deryk.sinotte ICE-7899: added patch that fixes the condition for loading cleint-side script for defining non-native Array.prototype.forEach function
          Files Changed
          Commit graph ADD /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/lib/myfaces/myfaces-api-2.1.6-ice-7926.jar
          Commit graph ADD /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/lib/myfaces/myfaces-impl-2.1.6-ice-7926.jar
          Commit graph DEL /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/lib/myfaces/myfaces-impl-2.1.6-ice-7855.jar
          Commit graph DEL /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/lib/myfaces/myfaces-api-2.1.6-ice-7855.jar
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28397 Mon Mar 19 10:33:07 MDT 2012 deryk.sinotte ICE-7899: added patch that fixes the condition for loading cleint-side script for defining non-native Array.prototype.forEach function
          Files Changed
          Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/myfaces-impl-2.1.6-ice-7855.jar
          Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/myfaces-impl-2.1.6-ice-7926.jar
          Commit graph DEL /icefaces3/trunk/icefaces/lib/myfaces/myfaces-api-2.1.6-ice-7855.jar
          Commit graph ADD /icefaces3/trunk/icefaces/lib/myfaces/myfaces-api-2.1.6-ice-7926.jar
          Mircea Toma made changes -
          Attachment ICE-7899.myfaces.patch [ 14203 ]
          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.
          Mircea Toma made changes -
          Assignee Mircea Toma [ mircea.toma ] Deryk Sinotte [ deryk.sinotte ]
          Deryk Sinotte made changes -
          Link This issue blocks ICE-7926 [ ICE-7926 ]
          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.
          Deryk Sinotte made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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.
          Ken Fyten made changes -
          Salesforce Case []
          Security Private [ 10001 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #29452 Tue Jun 12 11:34:54 MDT 2012 judy.guglielmin add my faces modified 2.1.7-ice-7899 jars and poms to snapshots repo for testing samples builds
          Files Changed
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-impl/2.1.7-ice-7899/myfaces-impl-2.1.7-ice-7899.pom
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-api/2.1.7-ice-7899
          Commit graph ADD /maven2/snapshots/org/apache/myfaces
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-impl/2.1.7-ice-7899
          Commit graph ADD /maven2/snapshots/org/apache
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-impl/2.1.7-ice-7899/myfaces-impl-2.1.7-ice-7899.jar
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-impl
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-api/2.1.7-ice-7899/myfaces-api-2.1.7-ice-7899.jar
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-api/2.1.7-ice-7899/myfaces-api-2.1.7-ice-7899.pom
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core
          Commit graph ADD /maven2/snapshots/org/apache/myfaces/core/myfaces-api
          Deryk Sinotte made changes -
          Link This issue blocks ICE-8290 [ ICE-8290 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: