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

Order of event handler method invocation should be greatest number of parameters to fewest

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0.5
    • 5.0.6
    • tapestry-core
    • None

    Description

      Say you are writing an activate event handler, meant to guard the page against access without a provided token.

      void onActivate(String token) {
      // validate the token
      }

      Object onPassivate()

      { return _token; }

      Great ... but what about the case where the user omits the token?

      Object onActivate() {
      return _invalidAuthorizationPage; // Redirect away
      }

      But with the current setup, this gets invoked BEFORE onActivate(String) so there's no hope of actually using the page, even with the security token.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: