You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Uwe Schäfer <sc...@thomas-daily.de> on 2010/03/22 23:02:29 UTC
Behaviour being also a Validator
hi
i ran into a problem, where a Behaviour, that at some point happens to
also implement also IValidator did no longer get the expected callbacks.
this is understandable given the fact, that i call either
add(IValidator) on FormComponent or add(IBehaviour) on Component to add it.
I am wondering, if a patch passing the call like:
FormComponent.java:
public final FormComponent add(final IValidator validator) {
// ...
if (validator instanceof IBehaviour){
add((IBehaviour)validator)
}
//...
was appropriate, or not. what do you think?
cu uwe
--
THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T + 49 761 3 85 59 0
F + 49 761 3 85 59 550
E schaefer@thomas-daily.de
www.thomas-daily.de
Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947
Registrieren Sie sich unter http://www.signin.thomas-daily.de für die
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
morgens um 9:00 in Ihrer Mailbox.
Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer
Redaktion lautet redaktion@thomas-daily.de.
To receive the free TD News International – a selection of the day’s top
issues delivered to your mail box every day – please register at
www.signin.thomas-daily.de
Please note: Information received for our TD News International after 4
p.m. will be given priority for publication the following day. The daily
editorial deadline is 8:30 a.m. You can reach our editorial staff at
redaktion@thomas-daily.de.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Behaviour being also a Validator
Posted by Jeremy Thomerson <je...@wickettraining.com>.
I don't see a problem with this. I think it would need to somehow be
bi-directional, though. i.e., if you had your object currently cast as a
behavior, and called add(IBehavior), that it would also need to add it as a
validator. The problem, of course, being that you can't just add the exact
same code to both methods or you end up with a stack overflow. We would
need to add a check for it existing in the collection, I suppose.
I'd suggest creating a JIRA with the contents of this thread.
--
Jeremy Thomerson
http://www.wickettraining.com
2010/3/22 Uwe Schäfer <sc...@thomas-daily.de>
> hi
>
> i ran into a problem, where a Behaviour, that at some point happens to also
> implement also IValidator did no longer get the expected callbacks.
>
> this is understandable given the fact, that i call either
> add(IValidator) on FormComponent or add(IBehaviour) on Component to add it.
> I am wondering, if a patch passing the call like:
>
> FormComponent.java:
>
> public final FormComponent add(final IValidator validator) {
> // ...
> if (validator instanceof IBehaviour){
> add((IBehaviour)validator)
> }
> //...
>
> was appropriate, or not. what do you think?
>
> cu uwe
> --
> THOMAS DAILY GmbH
> Adlerstraße 19
> 79098 Freiburg
> Deutschland
> T + 49 761 3 85 59 0
> F + 49 761 3 85 59 550
> E schaefer@thomas-daily.de
> www.thomas-daily.de
>
> Geschäftsführer/Managing Directors:
> Wendy Thomas, Susanne Larbig
> Handelsregister Freiburg i.Br., HRB 3947
>
> Registrieren Sie sich unter http://www.signin.thomas-daily.de für die
> kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages
> morgens um 9:00 in Ihrer Mailbox.
>
> Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
> 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00
> Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
> lautet redaktion@thomas-daily.de.
>
> To receive the free TD News International – a selection of the day’s top
> issues delivered to your mail box every day – please register at
> www.signin.thomas-daily.de
>
> Please note: Information received for our TD News International after 4
> p.m. will be given priority for publication the following day. The daily
> editorial deadline is 8:30 a.m. You can reach our editorial staff at
> redaktion@thomas-daily.de.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>