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

        There are no comments yet on this 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