ICEfaces
  1. ICEfaces
  2. ICE-6404

JS error with D&D demo on compat component showcase

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 2, compat component-showcase, D&D demo. Further testing indicates that this problem did not exist in the 2.0.0 Beta 2 release, svn rvn # 22976, but that it does exist by at least Nov. 30th, svn rev. # 23174, possible earlier.
    • Assignee Priority:
      P1

      Description

      When running comp. showcase using IF 2.0.0.RC2, opening the Drag & drop demo on IE8 results in the following JS error:


      Webpage error details

      User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)
      Timestamp: Fri, 17 Dec 2010 22:47:07 UTC


      Message: Syntax error
      Line: 46044353
      Char: 34
      Code: 0
      URI: http://10.18.39.143:8080/component-showcase/showcase.jsf

        Activity

        Ken Fyten created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 2.0.0 [ 10230 ]
        Assignee Priority P1
        Assignee Mircea Toma [ mircea.toma ]
        Hide
        Ken Fyten added a comment -

        Same error occurs in other browsers, but they don't report it if you aren't looking for it. From Chrome I see that this is the offending line:

        <script src="/component-showcase/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript">

        The "&" should be "&".

        Show
        Ken Fyten added a comment - Same error occurs in other browsers, but they don't report it if you aren't looking for it. From Chrome I see that this is the offending line: <script src="/component-showcase/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript"> The "&" should be "&".
        Hide
        Ken Fyten added a comment -

        Error screenshot.

        Show
        Ken Fyten added a comment - Error screenshot.
        Ken Fyten made changes -
        Ken Fyten made changes -
        Environment ICEfaces 2, compat component-showcase, RC2 ICEfaces 2, compat component-showcase, D&D demo. Further testing indicates that this problem did not exist in the 2.0.0 Beta 2 release, svn rvn # 22976, but that it does exist by at least Nov. 30th, svn rev. # 23174, possible earlier.
        Salesforce Case []
        Assignee Mircea Toma [ mircea.toma ] Deryk Sinotte [ deryk.sinotte ]
        Priority Major [ 3 ] Critical [ 2 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23636 Sun Dec 19 09:24:08 MST 2010 mircea.toma ICE-6404 Avoid escaping JS code written inline.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/GroupRenderer.java
        Hide
        Mircea Toma added a comment -

        The syntax error was caused by malformed JS code written inline by GroupRenderer. Used DOMContext.createTextNodeUnescaped to avoid escaping the JS code.

        Show
        Mircea Toma added a comment - The syntax error was caused by malformed JS code written inline by GroupRenderer. Used DOMContext.createTextNodeUnescaped to avoid escaping the JS code.
        Hide
        Mircea Toma added a comment -

        The error line numbers reported are misleading because the JS code is evaluated dynamically. When navigating to the DnD page the received DOM update contains a <script> element that has escaped characters which are seen as syntax error during its evaluation.
        To see the right error line numbers one needs to navigate to DnD page and then reload the page, this way the line number reported after the page load will point to the correct location.

        Show
        Mircea Toma added a comment - The error line numbers reported are misleading because the JS code is evaluated dynamically. When navigating to the DnD page the received DOM update contains a <script> element that has escaped characters which are seen as syntax error during its evaluation. To see the right error line numbers one needs to navigate to DnD page and then reload the page, this way the line number reported after the page load will point to the correct location.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mandeep Hayher added a comment -

        Tested successfully on Icefaces2 revision# 23643, using IE8.

        Show
        Mandeep Hayher added a comment - Tested successfully on Icefaces2 revision# 23643, using IE8.
        Mandeep Hayher made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: