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 <schae...@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 schae...@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 redakt...@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 > redakt...@thomas-daily.de. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >