IIRC, DropDownChoice requires a declaration like such: IModel<List<? extends Foo>>
So, this should work: IModel<List<? extends Foo>> choices = new AllUserModel(); I've been meaning to ask on the dev list why that is. Being forced to declare the "? extends User" for a model like yours seems to add complexity, and force a local variable. I haven't looked at it that much, but I know that every time I've had to declare one, I always think "that's weird". On Sun, Feb 22, 2009 at 10:55 PM, Matt Welch <matt...@welchkin.net> wrote: > > I'm sure I should know this but I can't seem to get it right. I have a > LoadableDetachableModel as follows: > > > private class AllUserModel extends > LoadableDetachableModel<List<User>>{ > protected List<User> load() { > return userService().findAllUsers(); > } > } > > > I'm trying to use this as the Choices model in a DropDownChoice, but no > luck. I'm sure I'm missing an <E> or a <T> or a<?> somewhere but I at a > lost > as to what the exact problem is. I've been a consumer of generics forever, > but actually being on the creation side is a bit new to me. > > -- > View this message in context: > http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-tp22155211p22155211.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Jeremy Thomerson http://www.wickettraining.com