On Sat, 07 Jun 2008, Igor Vaynberg wrote: > i dont think listitem#setmodel is restricted in your example.to T in > ListItem<T> > > > public <T> ListItem setModel(IModel<T> model) > > the first <T> hides the T of ListItem<T> so you might as well have > said <X> setModel(IModel<X> model)
Heh, you're right of course. There doesn't seem to be an easy way out, if you want to bind the type of the component with the type of its model only in a part of the Component inheritance hierarchy. I still find loosening the model type checks also in parametrised subclasses of Component a viable alternative for 1.4 (with less reuse of type variable names than what I'm guilty of :)). That is if we want to provide a fairly compatible alternative for migrating from 1.3. But on longer term, decoupling IModel from Component might be the best thing to have come out of this generics episode. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oy <URL: http://www.ri.fi/ > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
