Changing the display name for a business object

The Management Center framework uses the display name of a business object to identify the object when that object displays in Management Center. The display name for an object can display in the explorer view, utilities view, list views, and properties views.

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 name of the Management Center component.
  3. Open the object definition file that includes the display name for the business object that you want to change.
    Within the definition file, the displayNameProperty and displayNameObjectPath attributes define the display name for the business object.
  4. Edit the displayNameProperty and displayNameObjectPath attributes to change the display name for the object.
    For example, by default, the display name property for sales categories is the identifier property. The following code snippet shows the default attribute settings for this display name property.
    
    <PrimaryObjectDefinition definitionName="cmc/catalog/BaseSalesCatalogGroupPrimaryObjectDefinition" 
     detailsViewHeaderText="${catalogResources.UtilityPaneHeaderText}" displayName="${catalogResources.salesCategory_DisplayName}" 
     displayNameProperty="identifier"  newDisplayName="${catalogResources.salesCategory_NewDisplayName}" 
     ... 
    >
    To change the display name from the identifier value to be the name of the category, change the value for the displayNameProperty attribute to be "name". Set the displayNameObjectPath attribute with a value of "CatalogGroupDescription".
    
    <PrimaryObjectDefinition definitionName="cmc/catalog/BaseSalesCatalogGroupPrimaryObjectDefinition" 
     detailsViewHeaderText="${catalogResources.UtilityPaneHeaderText}" displayName="${catalogResources.salesCategory_DisplayName}" 
     displayNameProperty="name" displayNameObjectPath="CatalogGroupDescription"
     newDisplayName="${catalogResources.salesCategory_NewDisplayName}" 
     ... 
    >
  5. Optional: If you need to also change the display name that displays in the utilities view for the business object, update the search grid definition for the object.
    1. Expand LOBTools > WebContent > WEB-INF > src > xml > commerce > component > listViewDefinitions, where component is the name of the Management Center component.
    2. Open the object search grid list view definition file.
      For example, the CategorySearchGrid.xml file includes the utilities view definition that defines the display name for category objects.
    3. Locate the object grid definition within the file.
      For example, the definition within the CategorySearchGrid.xml resembles the following code snippet.
      
      <ObjectGrid definitionName="cmc/catalog/CategoryUtilitiesSearchGrid" preferenceKey="catCategoryUtilitiesSearchGrid">
        <dependency localName="foundationResources" moduleName="cmc/foundation/FoundationResources"/>
        <dependency localName="catalogResources" moduleName="cmc/catalog/CatalogResources"/>
        <GridIconTypeImage name="typeIcon" propertyName="null" required="true" text="${foundationResources.utilitiesGrid_type}" width="100"/>
        <GridDisplayName name="displayName" propertyName="null" showLongDisplayName="true" 
         text="${catalogResources.UtilityPaneHeaderText}" width="170"/>
        ...
      </ObjectGrid>
    4. Update code that defines the object display name for the utilities view.
      For example, to set the display name as the identifier property, remove the following line of code:
      
      <GridDisplayName name="displayName" propertyName="null" showLongDisplayName="true" 
         text="${catalogResources.UtilityPaneHeaderText}" width="170"/>
      Replace the removed code with the following line of code:
      
      <GridText name="displayName" propertyName="identifier" 
       text="${catalogResources.UtilityPaneHeaderText}" width="170"/>  
    5. Save and publish your changes.