introduce this into Isis applib:
public interface Mapper<S,T> {
```
Class<? extends S> getSourceClass();
Class<? extends T> getTargetClass();
@Programmatic
T map(S s);
```
}
Then search for domain classes that implement:
@DomainService(nature=DOMAIN)
public CountryToDto implements Mapper<Country, CountryDto> {
public CountryDto map(Country c) { ... }
}
@DomainService(nature=DOMAIN)
public CountryToRowHandler implements Mapper<Country, CountryRowHandler> {
public CountryRowHandler map(Country c) { ... }
}
and provide a drop-down selector to choose how to export (as Country, as CountryDto, as CountryRowHandler etc).
```
```
from https://github.com/isisaddons-legacy/isis-wicket-excel/issues/4