Tapestry
  1. Tapestry
  2. TAPESTRY-1159

Rollover component and async DirectLink - Dojo: Error evaluating script

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.1
    • Component/s: JavaScript
    • Labels:
      None
    • Environment:
      FF 1.5.0.8

      Description

      Refreshing nested DOM element after asynchronous request (async DirectLink was used) containing Rollover element throws

      ERROR: Error evaluating script:
      //<![CDATA[
      var tapestry._preload = new Array();
      if (document.images)

      { tapestry._preload[0] = new Image(); tapestry._preload[0].src = "/MultiPegaz/images/del.gif"; tapestry._preload[1] = new Image(); tapestry._preload[1].src = "/MultiPegaz/images/del_off.gif"; }


      tapestry.mouseOver_$Rollover=function()

      { if (document.images) document.getElementById('$Rollover').src = tapestry._preload[0].src; }


      tapestry.mouseOut_$Rollover=function()

      { if (document.images) document.getElementById('$Rollover').src = tapestry._preload[1].src; }


      //]]>
      [SyntaxError: missing ; before statement]

      There is no ; after each anonymous function definition

      1. palette_deselect_dis.gif
        1 kB
        Grzegorz Mrowka
      2. palette_deselect.gif
        1 kB
        Grzegorz Mrowka
      3. Test.html
        1 kB
        Grzegorz Mrowka
      4. Test.java
        1 kB
        Grzegorz Mrowka

        Activity

        Hide
        Jesse Kuhnert added a comment -

        Added ";" , though it is odd this would blow up . eh..

        Show
        Jesse Kuhnert added a comment - Added ";" , though it is odd this would blow up . eh..
        Hide
        Grzegorz Mrowka added a comment -

        The problem still exists, but now there are two JavaScript errors.
        One more ";" is missing, maybe after anonymous block of code
        if (document.images)

        {...}

        ?
        but I am not sure.
        And another strange thing happend - in the result page "\n" are passed over.

        Show
        Grzegorz Mrowka added a comment - The problem still exists, but now there are two JavaScript errors. One more ";" is missing, maybe after anonymous block of code if (document.images) {...} ? but I am not sure. And another strange thing happend - in the result page "\n" are passed over.
        Hide
        Grzegorz Mrowka added a comment -

        This fix made another bug.
        Rollover component is not working properly.
        mouseOver / mouseOut events are not handled.

        Show
        Grzegorz Mrowka added a comment - This fix made another bug. Rollover component is not working properly. mouseOver / mouseOut events are not handled.
        Hide
        Jesse Kuhnert added a comment -

        To be pushed out sometime later today .

        Show
        Jesse Kuhnert added a comment - To be pushed out sometime later today .
        Hide
        Grzegorz Mrowka added a comment -

        The problem still exists
        After Ajax response two JavaScript errors saying "missing ; before statement".
        Rollover component is still not working properly.
        mouseOver / mouseOut events are handled only for the first Rollover component on the page.

        Show
        Grzegorz Mrowka added a comment - The problem still exists After Ajax response two JavaScript errors saying "missing ; before statement". Rollover component is still not working properly. mouseOver / mouseOut events are handled only for the first Rollover component on the page.
        Hide
        Jesse Kuhnert added a comment -

        Arghh. heh Do you have a test case or example perhaps?

        Show
        Jesse Kuhnert added a comment - Arghh. heh Do you have a test case or example perhaps?
        Hide
        Grzegorz Mrowka added a comment -

        Here you are

        Show
        Grzegorz Mrowka added a comment - Here you are
        Hide
        Jesse Kuhnert added a comment -

        Finally! Sorry for making you suffer for so long. Things should work now. (or , in an hour or so after I deploy the changes.)

        Show
        Jesse Kuhnert added a comment - Finally! Sorry for making you suffer for so long. Things should work now. (or , in an hour or so after I deploy the changes.)
        Hide
        Grzegorz Mrowka added a comment -

        Thank you Jesse.
        There is still one issue which left. In attach example you can see that images are not swaped for the last two rollover links.
        mouseOver / mouseOut events are still handled only for the first Rollover component on the page.
        I am using Rollover with contrib:table and only first acts properly.

        Show
        Grzegorz Mrowka added a comment - Thank you Jesse. There is still one issue which left. In attach example you can see that images are not swaped for the last two rollover links. mouseOver / mouseOut events are still handled only for the first Rollover component on the page. I am using Rollover with contrib:table and only first acts properly.
        Hide
        Jesse Kuhnert added a comment -

        Ah I see. The Rollover component had a <unique> specification in it's script file that was preventing it from writing out all the blocks for each individual link! Oops...

        Show
        Jesse Kuhnert added a comment - Ah I see. The Rollover component had a <unique> specification in it's script file that was preventing it from writing out all the blocks for each individual link! Oops...

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Grzegorz Mrowka
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development