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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.2
    • Fix Version/s: 5.1.0.2
    • Component/s: tapestry-core
    • Labels:
      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.

        Activity

        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.1.0.2 [ 12313706 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship made changes -
        Summary Submitting an ajax form with a numeric field and client validation on forces a page submit A JavaScript error for non-required fields will force Ajax form submits to be handled as a full-page request instead
        Hide
        Howard M. Lewis Ship added a comment -

        Ok, I have it reproduced. I bet if I made the property "required" we'd get the correct behavior.

        Show
        Howard M. Lewis Ship added a comment - Ok, I have it reproduced. I bet if I made the property "required" we'd get the correct behavior.
        Hide
        Howard M. Lewis Ship added a comment -

        Tapestry has a bulit-in test case for this (part of page ZoneDemo) and it is working fine in FF and IE6. However, it doesn't precisely match your case, so I'll have to duplicate that.

        Show
        Howard M. Lewis Ship added a comment - Tapestry has a bulit-in test case for this (part of page ZoneDemo) and it is working fine in FF and IE6. However, it doesn't precisely match your case, so I'll have to duplicate that.
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Hide
        Hugo Palma added a comment -

        Changed this to critical as it seems to me that this is a core functionality that isn't working and there's no workaround that doesn't compromise basic functionality.

        Show
        Hugo Palma added a comment - Changed this to critical as it seems to me that this is a core functionality that isn't working and there's no workaround that doesn't compromise basic functionality.
        Hugo Palma made changes -
        Field Original Value New Value
        Affects Version/s 5.1.0.2 [ 12313706 ]
        Affects Version/s 5.1.0.1 [ 12313660 ]
        Priority Major [ 3 ] Critical [ 2 ]
        Hugo Palma created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Hugo Palma
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development