This is not really Wicket related, but I don't quite know where else to ask this. The question is: why won't this compile?

// I define a model
IModel<List<Subgenre>> subgenreModel = new AbstractReadOnlyModel<List<Subgenre>>() {
   ...
}

// Here I try to use the model
FieldSwitchPanel subgenrefield = *new SubgenreFieldSwitchPanel("subgenre", subgenreModel);*


// This is the constructor for the class SubgenreFieldSwithcPanel
public SubgenreFieldSwitchPanel(String id, IModel<List<? extends DomainObject>> choices) {
   ...
}


// Subgenre extends DomainObject
public class Subgenre extends DomainObject{
   ...
}


The complaint is: The constructor SubgenreFieldSwitchPanel(String, IModel<List<Subgenre>>) is undefined.

Thanks,
Linda

Reply via email to