You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by eugenebalt <eu...@yahoo.com> on 2013/03/14 15:35:07 UTC

Some Validators Not Kicking In

We're having an issue where some of our validators aren't kicking in.

A bunch of Component- and Form-level validators are added in the page
constructor. We have output statements in each. The output shows that in
some situations some of the validators are "short-circuited" and don't get
executed even though we've added them. Any ideas?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Some Validators Not Kicking In

Posted by eugenebalt <eu...@yahoo.com>.
Sorry to keep posting, but does order matter? We're adding the validators in
all kinds of order.

Sometimes, we have a field that shows messages associated with itself, AND
its Form-level validator. But that doesn't work for other fields, which
don't show the Form-associated validator.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242p4657251.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Some Validators Not Kicking In

Posted by eugenebalt <eu...@yahoo.com>.
So if I have something wrong with my field (by itself), than any Form
validators that involve it as well, won't kick in?

>From the documentation:
These validators are added to the form and only executed if all form
components returned by getDependentFormComponents() have been successfully
validated before this validator runs. 

What if I need to show all messages, both "solo" and Form-level?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242p4657250.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Some Validators Not Kicking In

Posted by eugenebalt <eu...@yahoo.com>.
That may be it. The Form-level ones are the ones not executing sometimes.

So to check if it's invalid, I just see if getDependentComponents() returns
NULL? And what could cause it to be NULL, if I'm specifying the right valid
components that exist on the form?

Thanks again



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242p4657249.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Some Validators Not Kicking In

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Looking at org.apache.wicket.markup.html.form.Form#validateFormValidator I
see that form validator will be skipped if any of its
org.apache.wicket.markup.html.form.validation.IFormValidator#getDependentFormComponents
is already invalid.


On Thu, Mar 14, 2013 at 3:35 PM, eugenebalt <eu...@yahoo.com> wrote:

> We're having an issue where some of our validators aren't kicking in.
>
> A bunch of Component- and Form-level validators are added in the page
> constructor. We have output statements in each. The output shows that in
> some situations some of the validators are "short-circuited" and don't get
> executed even though we've added them. Any ideas?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Some-Validators-Not-Kicking-In-tp4657242.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>