In my DropDownChoice
I want to show two fields: Name - Surname
DropDownChoice<Person> customer = new DropDownChoice<Person>(
"customer", new PropertyModel<Person>(customermodel, "customer"),list, new ChoiceRenderer<Person>("name", "id"));
How I can do that? Like: Peter - Griffin
You can just override
getDisplayValue(Person object)
method forChoiceRender
like this:Or just implement your own
IChoiceRenderer
interface.