Changing the text style for object display names

The Management Center framework uses the display name of a business object when that business object is shown in the user interface. You can change the text style, such as the color or font style, that is used for the business object display names in the explorer view. For example, by changing the style, business users can more easily see key information about a business object.You can also change the text color or font to indicate specific information about a business object. For example, you can change the text style of display names to indicate whether a category or subcategory display to customers or is hidden from customers in the storefront.

Procedure

  1. Open HCL Commerce Developer and switch to the Enterprise Explorer view.
  2. Expand LOBTools > WebContent > WEB-INF > src > xml > commerce > component > objectDefinitions, where component is the Management Center component.
  3. Open the primary object definition file that includes the business object display name that you want to change.
    For example, if you want to change the text style for sales categories, open the CatalogGroupPrimaryObjectDefinition.xml file for editing.
  4. Define the DisplayNameStyle definition for the business object to specify the characteristics that define the text style for the business object.
    Set or update the color, bold, and italic attributes to change the text style.
    For example, the following code snippet changes the text style for category display names to display as green, boldfaced, and italicized.
    
    <PrimaryObjectDefinition baseDefinition="cmc/catalog/BaseCatalogGroupPrimaryObjectDefinition" 
     compatibleObjectTypes="CatalogGroup,SalesCatalogGroup" definitionName="cmc/catalog/InheritedCatalogGroup" 
     displayName="${catalogResources.inheritedMasterCategory_DisplayName}" headerIcon="inheritedCatalogGroupHeaderIcon" 
     icon="inheritedCatalogGroupIcon" objectType="InheritedCatalogGroup">
      <dependency localName="catalogResources" moduleName="cmc/catalog/CatalogResources"/>
      <DisplayNameStyle color="0x008000" bold="true" italic="true" />
    ...
    </PrimaryObjectDefinition>
    

    You can also define enablement conditions to control when the text style changes, so that the text style changes only when a specific condition is met. By setting enablement conditions to change the text style, business users can quickly identify key information about an object based on the text style.

    For example, the following code snippet includes an enablement condition to check the value for the "xdesc_published" property. This property indicates whether a category is published. If the value for the property is "1", the display name style definition is used to change the text style for the category display name.
    
    <PrimaryObjectDefinition baseDefinition="cmc/catalog/BaseCatalogGroupPrimaryObjectDefinition" 
     compatibleObjectTypes="CatalogGroup,SalesCatalogGroup" definitionName="cmc/catalog/InheritedCatalogGroup" 
     displayName="${catalogResources.inheritedMasterCategory_DisplayName}" headerIcon="inheritedCatalogGroupHeaderIcon" 
     icon="inheritedCatalogGroupIcon" objectType="InheritedCatalogGroup">
      <dependency localName="catalogResources" moduleName="cmc/catalog/CatalogResources"/>
      ...
      <DisplayNameStyle color="0x008000" bold="true" italic="true"<
        <EnablementCondition propertyName="xdesc_published" objectPath="cmc/catalog/CatalogGroupDescription" enablementValue="1" />
      </DisplayNameStyle>
    ...
    </PrimaryObjectDefinition>
    
  5. Save and publish your changes.