Thx Maurice, your are right. I was using Wicket 1.4M1.
I checked out latest from trunk, and it OK. ;)

So another problematic compiler warning. 
For example  simple  - subtype of Label, which has model type of anything
Serializable.



public class ExtendedLabel<T extends Serializable> extends
Label<T&gt{

   private IStringProvider stringProvider = null;


   public ExtendedLabel(String id, IModel model, IStringProvider
stringProvider) {
        super(id, model);
        this.stringProvider = stringProvider;
   }

   public ExtendedLabel(String id, String text) {
        this(id, new Model(text), new BasicStringProvider());
        //this(id, new Model<T>(text), new BasicStringProvider());    
//error
   }

}




The problematic part, is the second constructor, which calls this. Its
second parameter - "new Model(text)", 

which I cannot generify. If I write "new Model(text)", I get an error: "The
constructor Model(String) is undefined."   


I can't find out, what I am doing wrong.


Thx

Stefan Simik





-- 
View this message in context: 
http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html
Sent from the Wicket - User mailing list archive at Nabble.com.

Reply via email to