Wicket
  1. Wicket
  2. WICKET-4853

Change FormComponent#reportRequiredError() from private to protected

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.9, 6.3.0
    • Component/s: wicket
    • Labels:
      None

      Description

      It is awkward to provide a custom "required" message for a form component from Java. One must override and re-implement validate(). Making the form component not required and providing an explicit validator is sub-optimal, since there may be other components that depend on the required flag. For example, I have a label component that automatically adds a star when attached to a required form component.

      Making FormComponent#reportRequiredError() protected would make this trivial.

      This was discussed here: http://mail-archives.apache.org/mod_mbox/wicket-dev/201204.mbox/%3CCAMomwMoL_EtXodWtrQhVNnuKrBnfDA+i93+fTSCF4BjyOYFyJQ@mail.gmail.com%3E

        Activity

        Martin Grigorov made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Martin Grigorov [ mgrigorov ]
        Fix Version/s 6.3.0 [ 12323327 ]
        Fix Version/s 1.5.9 [ 12322962 ]
        Resolution Fixed [ 1 ]
        John Krasnay created issue -

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            John Krasnay
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development