In Wicket 2 the Label class is defined as
 
     public class Label extends WebComponent
 
The Label class inhertis setModelObject from Comonent<T> through the genetric 
class WebComponent<T>.
The method
 
     public final Component setModelObject(final T object)
 
is generic too.
 
Now If we have code like
 
     Label l = new Label(this, "label", "The label's modelObject");
     l.setModelObject("The new modelObject");
 
alway leads to a warning like
 
     the method setModelObject belongs to the raw type Component...
 
Declaring Label like
 
     public class Label extends WebComponent<String>
 
would remove the warning and should not affect any part of wicket. Or am I 
wrong?
 
Stefan Lindner

Reply via email to