The code we wanted to write was equivalent to:
where NflLeague is an enum that implements INflLeague :
There are two issues:
- first, in the metamodel we don't introspect enums to recognise that a list of NflLeague enum instances can be returned in the choices method returning List<INflLeague>
- second, in the Wicket viewer the selection of the choicesPanel is based on the type, and if an interface is used then it guesses a referencePanel rather than ValueSelect2Panel that is normally used for enums. The marshalling logic for ReferencePanel assumes entities, and fails when handed a bunch of scalar enums.