If we loose the wildcard is it then still possible to do everything? We have it to be able to use a <Manager> List when we declare it as a <People> When you have that you have to copy it over i guess by a helper method.
I just want to know for sure that i dont miss something that if we remove it that then something is not possible anymore On Mon, Mar 2, 2009 at 05:26, Timo Rantalaiho <timo.rantala...@ri.fi> wrote: > Background: > > https://issues.apache.org/jira/browse/WICKET-1512 > > https://issues.apache.org/jira/browse/WICKET-2126 > > > http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-td22155211.html > > > This works: > ===== clips ==================================================== > public static void main(String[] args) { > Foo foo = new Foo(); > foo.bar().add(new String("quux")); > } > > @SuppressWarnings("unchecked") > public List<String> bar() { > List<? extends String> list = new > ArrayList<String>(Arrays.asList("foo", "bar")); > return (List<String>) list; > } > ===== /clips =================================================== > > > This doesn't work: > ===== claps ==================================================== > public static void main(String[] args) { > Foo foo = new Foo(); > foo.bar().add(new String("quux")); > } > > public List<? extends String> bar() { > List<? extends String> list = new > ArrayList<String>(Arrays.asList("foo", "bar")); > return list; > } > ===== /claps =================================================== > > > > [ ] Yes, change the DropDownChoice constructor to take the > choices list as IModel<List<T>> or List<T> without the > wildcard > > [ ] No, keep DropDownChoice as it is in Wicket 1.4-rc2 > > > > Best wishes, > Timo > > -- > Timo Rantalaiho > Reaktor Innovations Oy <URL: http://www.ri.fi/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >