I'm using a DropDownChoice that looks like this:

    DropDownChoice component = new DropDownChoice("component",
                                        new PropertyModel(task,
"componentId"),
                                        new PropertyModel(task,
"project.components"),
                                        new ChoiceRenderer("name", "id"));

The problem is that task.project.components is a List<Component> and
task.componentId is an int, so I get an error that says:

    No get method defined for class: class java.lang.Integer expression: id

I know that I can fix the problem by making the DropDownChoice's model a
Component instead of an int. However, I would like to avoid that, since that
would require reworking the Task class. Is there a way to make this work?

Reply via email to