About the Icon for a Type's Tree

When displaying the tree for an object type, the system uses the image file specified in the emxSystem.properties file for that object type.

For example, this property defines the icon for a mechanical part:

emxFramework.smallIcon.type_MechanicalPart = iconSmallMechanicalPart.gif  

This property is also used to display an icon for the type (in addition to the column's data) in a table column when the Show Type Icon setting is true for the column. If there is no property defined for the type's icon, the system looks for a property for the type's parent type icon, then grandparent's type and so on. If no property is defined for any parent type's icon, the system uses the default image, defined by this property:

# default icon name for the type
emxFramework.smallIcon.defaultType = iconSmallDefault.gif  

One exception to the above is that if the system uses a parent's tree menu because no tree menu is defined for the subtype, then it uses the icon associated with the parent type instead of the subtype.

In addition to using the icon as defined above, you can define an additional icon based on a business rule to show in the root node of the tree. For example, you could show different icons depending on the object's lifecycle state. The emxSystem.properties file lets you define a JPO:method to execute the logic and return the required icon:

emxFramework.UIComponents.OverriddenTypeIcon.Program=<JPO Name>:<Method Name>

This property defines a global JPO:method to use for fields and columns (that define the Show Type Icon or Show Alternate Icon settings) and all navigation trees. To use a different JPO:method for a specific tree, use the Type Icon Function and Type Icon Program settings when defining the tree (and an appropriately coded JPO program:method).

The function that retrieves the custom icons to display for the root node in the tree must return an image name or path for the id that is passed to it. The path, including the image name, must be specified relative to the ematrix\common directory. The image must be a gif image, and cannot include any spaces or special characters.

You cannot override the Type icon for the generic create form component, emxCreate.jsp.

For details about the JPO method signature, input arguments, returned values and sample JPO code, see Column Values Including Additional Icons in the Tables section.