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

A JavaScript error for non-required fields will force Ajax form submits to be handled as a full-page request instead

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 5.1.0.2
    • 5.1.0.2
    • tapestry-core
    • None

    Description

      Here a simple test case, in the template:

      <div t:type="form" t:zone="valueZone" t:clientValidation="true">
      <span t:type="textfield" t:value="value"/>

      <div t:type="submit" value="submit" class="button"/>

      <div t:type="zone" t:id="valueZone">
      <t:outputraw t:id="outputComponent" value="value"/>
      </div>
      </div>

      the class:

      @Property
      private Long value;

      @Component
      private OutputRaw outputComponent;

      Object onSuccess()

      { return outputComponent; }

      when you submit the form you'll see that a full page refresh is done when it shouldn't because the zone form parameter is set. If you change the value field in the class from Long to String the form submit will then perform an ajax request as expected.
      Also, if i turn off client side validation on the form it works with numeric values.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hpalma Hugo Palma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: