When an asset is displayed in the UI, its name is often accompanied by an icon that represents its type. You can specify icons for a repository item type in the GSA template for the repository that contains the item descriptor.
An item descriptor definition can include the following attributes for specifying icons to be displayed in the Flex-based Asset Manager:
flexIconResource
: The icon that appears in lists inside navigation panels.largeFlexIconResource
: The icon that appears in the header of the asset editor.
Both of these attributes specify keys into a resource bundle that is specified using the "resourceBundle"
attribute. Each resource string represents the URL of an icon image file.
MerchConfig.019
, for example, to define a custom icon for the "facility"
item type from the previous examples:
Add attributes such as the following to the
"facility"
item descriptor in theProductCatalog GSA
template:
<attribute name="resourceBundle" value="my.module.Resources"/> <attribute name="flexIconResource" value="facility.icon"/> <attribute name="largeFlexIconResource" value="facility.largeIcon"/>
Add lines such as the following to
my/module/Resources.properties
, in your module’s class path:
facility.icon=/MerchConfig/images/facility.png facility.largeIcon=/MerchConfig/images/facility.png
Add the
facility.png
file to the images directory of the/MerchConfig
web app.