Tapestry
  1. Tapestry
  2. TAPESTRY-2341

AJAX Zone updating doesn't work correctly in IE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.13
    • Component/s: tapestry-core
    • Labels:
      None
    • Environment:
      T5.0.11, IE6.0.2900, FF2.0.0.6, Tomcat5.5.9
      OS: Windows XP

      Description

      The attached page demonstrates that if an actionlink that causes a zone refresh via AJAX is part of the refreshed zone itself, it only works on alternate clicks in IE6.

      Each time the link is rendered as part of the zone update it causes a full page refresh when clicked, which means it can do a zone update the following click. It works fine in Firefox though. (Josh Canfield reports it works okay in IE7)

      Additionally, if I return a block instead of a zone the second click in the link inside causes the ComponentEventException shown below, instead of the full page refresh.

      org.apache.tapestry.runtime.ComponentEventException - A component event handler method returned the value org.apache.tapestry.internal.structure.BlockImpl@d26103. Return type org.apache.tapestry.internal.structure.BlockImpl can not be handled.
      Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
      org.apache.tapestry.runtime.Component.

      1. BasicAJAX.java
        0.5 kB
        Andy Blower
      2. BasicAJAX.tml
        0.6 kB
        Andy Blower

        Issue Links

          Activity

          Hide
          Andy Blower added a comment -

          Example java class

          Show
          Andy Blower added a comment - Example java class
          Hide
          Andy Blower added a comment -

          Example template.

          Show
          Andy Blower added a comment - Example template.
          Hide
          Alex.Hon added a comment - - edited

          @see http://www.prototypejs.org/2007/10/16/prototype-1-6-0-rc1-changes-to-the-class-and-event-apis-hash-rewrite-and-bug-fixes #Changes to the Event API

          modify tapestry.js about linkZone:function...

          • element.onsubmit = handler;
            + Event.observe(element, 'submit', handler);
          • element.onclick = handler;
            + Event.observe(element, 'click', handler);
            and need add new line :Event.stop(event);
            after new Ajax.Request(element.href, { onSuccess : successHandler }

            );

          Show
          Alex.Hon added a comment - - edited @see http://www.prototypejs.org/2007/10/16/prototype-1-6-0-rc1-changes-to-the-class-and-event-apis-hash-rewrite-and-bug-fixes #Changes to the Event API modify tapestry.js about linkZone:function... element.onsubmit = handler; + Event.observe(element, 'submit', handler); element.onclick = handler; + Event.observe(element, 'click', handler); and need add new line :Event.stop(event); after new Ajax.Request(element.href, { onSuccess : successHandler } );
          Hide
          Howard M. Lewis Ship added a comment -

          Did a bit of work to refactor how events are processed in general and tested using FF, IE 7 and IE 6. Order of initialization is no longer a major issue, as the evaluation of the zone is deferred until the form is submitted (or link clicked, whatever the case may be).

          Show
          Howard M. Lewis Ship added a comment - Did a bit of work to refactor how events are processed in general and tested using FF, IE 7 and IE 6. Order of initialization is no longer a major issue, as the evaluation of the zone is deferred until the form is submitted (or link clicked, whatever the case may be).

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Andy Blower
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development