you can use:
public final <S extends Component> Object visitChildren(final Class<?>
clazz,
final IVisitor<S> visitor)
then you have to cast yes, but you can cast safely.
johan
On Mon, Jul 26, 2010 at 11:09, Joseph Pachod <[email protected]> wrote:
> hello
>
> I wanted to do an Component.IVisitor for all children components
> implementing IFormModelUpdateListener.
>
> However, IVisitor requires something extending Component, which
> IFormModelUpdateListener can't do (it's an interface).
>
> As such, I had to dump all generics info and do instanceof to get it
> running.
>
> However, for wicket 1.5 I guess, shouldn't there be an IComponent interface
> that IFormModelUpdateListener would implement ? IVisitor would then be of <T
> extends IComponent> and I could do an IVisitor<IFormModelUpdateListener>.
>
> What's your pick on that ?
>
> ++
>
> --
> Joseph Pachod
> IT
>
> THOMAS DAILY GmbH
> Adlerstraße 19
> 79098 Freiburg
> Deutschland
> T + 49 761 3 85 59 506
> F + 49 761 3 85 59 550
> E [email protected]
> www.thomas-daily.de
>
> Geschäftsführer/Managing Directors:
> Wendy Thomas, Susanne Larbig
> Handelsregister Freiburg i.Br., HRB 3947
>
> Registrieren Sie sich unter https://www.thomas-daily.de/user/sign-in für die
> TD Morning News, eine kostenlose Auswahl aktueller Themen aus TD Premium,
> morgens ab 9:15 in Ihrer Mailbox.
>
> Aktuelle Presseinformationen für die TD Morning News und TD Premium nimmt
> unsere Redaktion unter [email protected] entgegen.
> Redaktionsschluss für die TD Morning News ist täglich um 8:45.
>
> Register free of charge at https://www.thomas-daily.de/user/sign-in to have
> the TD Morning News, a selection of the latest topics from TD Premium,
> delivered to your mailbox from 9:15 every morning.
>
> Our editorial department receives the latest press releases for the TD
> Morning News and TD Premium at [email protected]. The editorial
> deadline for the TD Morning News is 8.45am daily.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]