Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3767

INullAcceptingValidator behavior seems broken in 1.5-RC4.2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC4
    • Fix Version/s: 1.5-RC5
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      N/A

      Description

      As discussed in this forum thread:
      http://apache-wicket.1842946.n4.nabble.com/INullAcceptingValidator-behavior-tp3570352p3570352.html

      It appears that Wicket no longer calls INullAcceptingValidator intances when the validatable value is null.

      Wicket wraps validators as behaviors, using the adapter pattern. The adapter class (org.apache.wicket.validation.ValidatorAdapter) implements the interface IValidator<T>. This "hides" the case where the actual validator is an INullAcceptingValidator. Therefore, when going through a component's attached validators, the code of org.apache.wicket.markup.html.form.FormComponent will never call INullAcceptingValidators when the value is null.

        Attachments

        1. FixNullValidation.patch
          0.6 kB
          Alexandros Karypidis

          Activity

            People

            • Assignee:
              ivaynberg Igor Vaynberg
              Reporter:
              akarypid Alexandros Karypidis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: