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

        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.
        Hide
        Arturo Zambrano added a comment -

        fixed

        Show
        Arturo Zambrano added a comment - fixed

          People

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

            Dates

            • Created:
              Updated:
              Resolved: