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

          Geoff Callender created issue -
          Geoff Callender made changes -
          Field Original Value New Value
          Link This issue relates to TAPESTRY-1972 [ TAPESTRY-1972 ]
          Geoff Callender made changes -
          Description The example in http://tapestry.apache.org/tapestry5/guide/validation.html has to be fixed inline with 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";
             }
          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";
             }
          Howard M. Lewis Ship made changes -
          Summary The documentation shows doing validation in onSuccess() The input validation documentation incorrectly shows validation occuring in the success event handler method
          Howard M. Lewis Ship made changes -
          Assignee Howard M. Lewis Ship [ hlship ]
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s 5.2.0 [ 12314122 ]
          Resolution Fixed [ 1 ]
          Geoff Callender made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Geoff Callender made changes -
          Affects Version/s 5.3.2 [ 12319260 ]
          Bob Harner made changes -
          Assignee Howard M. Lewis Ship [ hlship ] Bob Harner [ bobharner ]
          Bob Harner made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Fix Version/s 5.2.0 [ 12314122 ]
          Resolution Fixed [ 1 ]
          Bob Harner made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development