Adding or changing options in a drop-down list

You can customize the properties view for a business object to add or change a list option that displays in an existing list. Business users can then select from the customized list of options.

Before you begin

Review the following class definitions that define the information that can be included in the properties view for business objects:
ObjectProperties
The base class for all properties views.
PropertyDefinition
Defines information about object properties.
PropertyValue
Defines a selectable value for a property.

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 for the object that includes the list of options that you want to change.
  4. Optional: Add an option to a list of options for the business object.
    1. Within the object definition file, locate the property definition for the list of options that you want to change.
    2. Add a <PropertyValue> element to define your new option. Specify the display name and value for the option.
      For example, the following code snippet shows the property definition for the unit of measure property for an attribute value. A new unit of measure for grams is added to the definition.
      
      <PropertyDefinition displayName="${catalogResources.attributeValueUnitOfMeasure}" propertyName="xdescdata_UnitOfMeasure">
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_Day}" value="DAY"/>
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_Hour}" value="HUR"/>
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_Kilogram}" value="KGM"/>
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_gram}" value="GRM"/>
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_milligram}" value="MGM"/>
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_Month}" value="MON"/>
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_1_Unit}" value="C62"/>
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_Week}" value="WEE"/>
        <PropertyValue displayName="${catalogResources.attributeValueUnitOfMeasure_Year}" value="ANN"/>
      </PropertyDefinition>
      
    3. Create or update your extension resource bundle that defines the properties text for the business object to define the text for the new option.
      For more information about defining the properties for an object, see Defining user interface text in Management Center.
  5. Optional: Update the name for an existing option within a list of options.
    1. Within the object definition file, locate the property definition for the list of options that you want to change. Record the value for the displayName attribute for the option.
    2. Create or update your extension resource bundle that defines the properties text for the business object to update the display name text for the option.
  6. Save and publish your changes.