You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alexandros Karypidis (JIRA)" <ji...@apache.org> on 2011/06/03 12:09:47 UTC
[jira] [Updated] (WICKET-3767) INullAcceptingValidator behavior
seems broken in 1.5-RC4.2
[ https://issues.apache.org/jira/browse/WICKET-3767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexandros Karypidis updated WICKET-3767:
-----------------------------------------
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.
was:
As discussed in this forum thread:
It appears that 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.
Details and a suggested fix can be found in the users forum thread:
http://apache-wicket.1842946.n4.nabble.com/INullAcceptingValidator-behavior-tp3570352p3570352.html
> INullAcceptingValidator behavior seems broken in 1.5-RC4.2
> ----------------------------------------------------------
>
> Key: WICKET-3767
> URL: https://issues.apache.org/jira/browse/WICKET-3767
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC4
> Environment: N/A
> Reporter: Alexandros Karypidis
>
> 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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira