You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Adriano dos Santos Fernandes <ad...@gmail.com> on 2009/02/27 19:47:31 UTC

DropDownChoice constructor

Hi!

Maybe I'm dumb today :-), but I can't access this constructor:
    public DropDownChoice(String id, IModel<List<? extends T>> choices, 
IChoiceRenderer<T> renderer)

So I had created new functions using similar generics parameter, and it 
also don't work for the DDC equivalent:
    private <T> void temp1(String id, IModel<List<T>> choices, 
IChoiceRenderer<T> renderer)
    {
    }

    private <T> void temp2(String id, IModel<List<? extends T>> choices, 
IChoiceRenderer<T> renderer)
    {
    }

If I call:
    temp1("", (IModel<List<Conta>>) null, (IChoiceRenderer<Conta>) 
null);   // compile
    temp2("", (IModel<List<Conta>>) null, (IChoiceRenderer<Conta>) 
null);   // don't compile

Error is: The method temp2(String, IModel<List<? extends T>>, 
IChoiceRenderer<T>) in the type ... is not applicable for the arguments 
(String, IModel<List<Conta>>, IChoiceRenderer<Conta>).

I can't pass anything on the model. Should not the Wicket constructor be 
changed to IModel<List<T>> or what I'm missing?


Adriano


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice constructor

Posted by Adriano dos Santos Fernandes <ad...@gmail.com>.
Seems I'm late reading this list, and encounter the same problem 
discussed in another thread today. :-)


Adriano


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org