This is an unfortunate side-effect of the way that the framework determines the icon. If you specify an icon using the [IconName] attrbitute then it is held in the Naked Objects specification for that class and is picked up both when viewing an instance
and when viewing a collection of that type.
If you specify an icon via an IconName() method then this takes priority, and means that icons are specified on an instance basis. There is now no icon associated at class level (becsause each instance potentially has its own icon), so you get the
default icon for a collection.
It should be possible to modify the framework such that IconName() has priority over [IconName] for instance display, but that it will default to [IconName] for displaying a collection. I will raise an Issue for this - but it wis unlikely
to be done in the next few days. Meantime your options are:
- Fix this yourself in the source code (might be hard work)
- Temporarily use a custom view for a collection of Customers. Just copy the StandaloneTable view into a Customer folder within Views - then replace the Html.Object(Model) line with the required icon and label