Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-867

Do not display errors or errored field decoration on form refresh

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0
    • 4.1.2
    • Framework
    • None
    • Tapestry 4.0, Tomcat 5.5.9

    Description

      This is related to TAPESTRY-636. When a form's refresh listener is called, client-side validation is bypassed but server-side errors still show up. This becomes a problem if you want to refresh a form but not show any errors. Calling clearErrors() on the validation delegate does get rid of the error messages but it also clears any invalid data entered by the user, which is an unwanted side-affect. While onsite, Howard suggested a fix where errors kept in the validation delegate and errored field decoration would be switched off if the form's refresh listener was called. This would make the refresh listener on Form much more useful. One undesired side-affect might be that if errors are already displayed on the page from a previous form submission and the user does something to refresh the form, the errors would disappear.

      USE CASE: The user is filling out a self profile beginning with name and address, mistakenly enters '12e45' for the zip code, and then uploads a photo which automatically refreshes the form for a preview. Errors are displayed about the zip code and the remaining required fields which haven't been filled in only because the user hasn't gotten to them yet. Calling clearErrors() would get rid of the errors, but it would also clear the zip code entered by the user. Ideally, the form should maintain all input and not display any errors during this form refresh.

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            dotteben Ben Dotte
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: