Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1210

MultiZone update from EventLink with Form fails in Internet Explorer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.0
    • 5.2.0
    • tapestry-core
    • None

    Description

      A MultiZone update currently fails in Internet Explorer given the below template. This works fine in Chrome and Firefox. There appears to be an instance where purge() in tapestry.js is looping over elements, hits a null element, and blows up trying to access .name on it. Hit the "Click Me" link; notice the date does not update.

      .tml:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html title="IE Test"
      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
      xmlns="tapestry:parameter">

      <t:zone t:id="messageZone" id="messageZone">
      ${curTime}
      </t:zone>

      <t:form t:id="testForm" autofocus="false" zone="messageZone">

      <t:zone t:id="formZone" id="formZone">

      <t:eventlink event="clicked" zone="formZone">Click Me!</t:eventlink>

      <t:textfield t:id="testName" value="testValue" class="testing" maxlength="50"
      onKeyPress="javascript:blur();"
      onBlur="javascript:$('testForm').fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT);"/>

      </t:zone>

      </t:form>

      </html>

      .java:

      import org.apache.tapestry5.ajax.MultiZoneUpdate;
      import org.apache.tapestry5.annotations.InjectComponent;
      import org.apache.tapestry5.annotations.Property;
      import org.apache.tapestry5.corelib.components.Zone;

      import java.util.Date;

      public class IeTest
      {
      @Property
      private String testValue;

      @InjectComponent
      private Zone messageZone;

      @InjectComponent
      private Zone formZone;

      @Property
      private Integer curField;

      void setupRender()

      { testValue = "test"; }

      public String getCurTime()

      { return new Date().toString(); }

      Object onClicked()

      { return new MultiZoneUpdate("messageZone", messageZone.getBody()) .add("formZone", formZone.getBody()); }

      Object onSuccess()

      { return messageZone.getBody(); }

      }

      Attachments

        Activity

          People

            dotteben Ben Dotte
            dotteben Ben Dotte
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: