ICEfaces
  1. ICEfaces
  2. ICE-6780

Animation code causing exception when running in portlet

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-EE-Beta1, 2.0.1
    • Fix Version/s: EE-2.0.0.GA, 2.0.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2 portal portlets ACE

      Description

      When running the Animation ACE demo as a portlet, the following JS error is displayed in the console:

      node is null
      [Break On This Error] if (!node["animation"]) {

        Activity

        Deryk Sinotte created issue -
        Hide
        Deryk Sinotte added a comment -

        The code in question is in the ice.animation.register function of animation.js. A call to Y.one is using the following String as a selector argument:

        #A1811:tabSetFadeExample

        This is a normal JSF id but apparently colons (':') need to be escaped as they are special characters in CSS. I had trouble finding any definitive information about how this should work but I found this forum link that had an interesting discussion about this behaviour:

        http://yuilibrary.com/projects/yui3/ticket/2528057

        I tried one of the things they suggested in there - double escaping the colons so that the selector query doesn't misinterpret them. So:

        Y.one("'#A1811:tabSetFadeExample');

        becomes:

        Y.one("'#A1811
        :tabSetFadeExample');

        and that seemed to work as well. If we're supposed to be relying on getting something by it's id, perhaps getElementById would be the best choice, especially if we're using that everywhere else.

        Show
        Deryk Sinotte added a comment - The code in question is in the ice.animation.register function of animation.js. A call to Y.one is using the following String as a selector argument: #A1811:tabSetFadeExample This is a normal JSF id but apparently colons (':') need to be escaped as they are special characters in CSS. I had trouble finding any definitive information about how this should work but I found this forum link that had an interesting discussion about this behaviour: http://yuilibrary.com/projects/yui3/ticket/2528057 I tried one of the things they suggested in there - double escaping the colons so that the selector query doesn't misinterpret them. So: Y.one("'#A1811:tabSetFadeExample'); becomes: Y.one("'#A1811 :tabSetFadeExample'); and that seemed to work as well. If we're supposed to be relying on getting something by it's id, perhaps getElementById would be the best choice, especially if we're using that everywhere else.
        Hide
        Deryk Sinotte added a comment -

        Assigning to Art for making the adjustment.

        Show
        Deryk Sinotte added a comment - Assigning to Art for making the adjustment.
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Assignee Priority P1
        Assignee Arturo Zambrano [ artzambrano ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24367 Sun Apr 10 21:48:25 MDT 2011 art.zambrano ICE-6780 fixed by overriding YUI.one in all YUI instances to support ':'s in IDs
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.util/component.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24368 Sun Apr 10 21:52:44 MDT 2011 art.zambrano ICE-6780 fixed by overriding YUI.one in all YUI instances to support ':'s in IDs
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/ace/component/resources/org.icefaces.component.util/component.js
        Hide
        Arturo Zambrano added a comment -

        fixed

        Show
        Arturo Zambrano added a comment - fixed
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.0.2 [ 10273 ]
        Fix Version/s 2.1 [ 10241 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: