Tapestry 5
  1. Tapestry 5
  2. TAP5-812

The input validation documentation incorrectly shows validation occuring in the success event handler method

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.2, 5.1.0.5
    • Fix Version/s: None
    • Component/s: documentation
    • Labels:
      None

      Description

      The example in http://tapestry.apache.org/tapestry5/guide/validation.html has to be fixed as a consequence of TAPESTRY-1972 .

      Instead of this...

      String onSuccess()
      {
      if (!authenticator.isValid(userName, password))

      { form.recordError(passwordField, "Invalid user name or password."); return null; }

      return "PostLogin";
      }

      ...it should be...

      String onValidateForm()
      {
      if (!authenticator.isValid(userName, password))

      { form.recordError(passwordField, "Invalid user name or password."); }

      }

      String onSuccess()

      { return "PostLogin"; }

        Issue Links

          Activity

          Hide
          Bob Harner added a comment -

          Changed the example to use onValidateFromLoginForm() for validation

          Show
          Bob Harner added a comment - Changed the example to use onValidateFromLoginForm() for validation
          Hide
          Geoff Callender added a comment - - edited

          Nope, example in doco hasn't changed yet.
          The doco page is http://tapestry.apache.org/forms-and-validation.html

          Show
          Geoff Callender added a comment - - edited Nope, example in doco hasn't changed yet. The doco page is http://tapestry.apache.org/forms-and-validation.html

            People

            • Assignee:
              Bob Harner
              Reporter:
              Geoff Callender
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development