That should have been fixed. We should have probably done IModel<? extends Collection<T>> when we (I believe I submitted a patch) changed all the rest of the stuff to take IModel<? extends List<? extends T>> and stuff. We could change it without breaking anything. Widening it up would only allow it to accept more stuff, so existing code wouldn't break (but need to be recompiled I guess). For now, just cast it I guess.
On Fri, Feb 26, 2010 at 5:38 AM, Cyril <[email protected]> wrote: > Hello, > > I'm looking for the way to use the same IModel for a > ListMultipleChoice<User> and a ListView<User>. > > My model implements IModel<List<User>> because the ListView object needs a > IModel<? extends java.util.List<? extends T>>. But the ListMutipleChoice > needs a IModel<java.util.Collection<T>> model. > > I can't use my model with the listMultipleChoice because parameterized types > are invariant, so List<User> don't extends Collection<User>. > > Thanks > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
