Tapestry 5
  1. Tapestry 5
  2. TAP5-760

The Form event "validateForm" is awkwardly named and should be replaced with the simpler name "validate"

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.5
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      You end up with methods like onValidateFormFromLogin() which is just asking for trouble.

      onFormValidateFromLogin() is a bit better.

      Obviously, we keep the old name as well ... have to fire two events at the validate form stage.

      What would be a better name? Something that doesn't have "form" is it; perhaps "finalValidation" or just "validate". I remember this was a problem with calling it "validate" before, because this conflicted with the validate event form form control element components ... but is that really a problem?

        Activity

        Howard M. Lewis Ship created issue -
        Hide
        Massimo Lusetti added a comment -

        I really don't see a problem with the just-"validate" name.

        Show
        Massimo Lusetti added a comment - I really don't see a problem with the just-"validate" name.
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Summary The Form event "validateForm" is awkward, a new name (perhaps "formValidate") would be nice The Form event "validateForm" is awkward, just "validate" should do
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Howard M. Lewis Ship added a comment -

        I agree ... individual form element components will fire validate events, and now the Form will as well (validateForm is being kept for compatibility). These are events you would always qualify with the component id, so there never really was a reason for validateForm in the first place.

        Show
        Howard M. Lewis Ship added a comment - I agree ... individual form element components will fire validate events, and now the Form will as well (validateForm is being kept for compatibility). These are events you would always qualify with the component id, so there never really was a reason for validateForm in the first place.
        Howard M. Lewis Ship made changes -
        Summary The Form event "validateForm" is awkward, just "validate" should do The Form event "validateForm" is awkwardly named and should be replaced with the simpler name "validate"
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.2.0 [ 12314122 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development