Adding or changing options in a drop-down list

Add or change a list option used in an existing list within a Management Center properties view. Management Center business users can select your customized option from the list.

Before you begin

Review the following classes to ensure that you understand the classes that are associated with defining a properties view:
wcfObjectProperties
The base class for all properties views.
wcfPropertyDefinition
Defines information about object properties.
wcfPropertyValue
Defines a selectable value for a property.

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Complete one of the following steps:
    • WebSphere Commerce Version 7.0.0.0Feature Pack 1In the Enterprise Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > commerce > Management_Center_component > objectDefinitions, where Management_Center_component is the name of the tool you want to customize.
    • Introduced in Feature Pack 2In the Enterprise Explorer view, expand LOBTools > WebContent > config > commerce > Management_Center_component > objectDefinitions, where Management_Center_component is the name of the tool you want to customize.
  3. Add a new item to the list, or change the name of a list item:
    OptionDescription
    WebSphere Commerce Version 7.0.0.0Feature Pack 1Add a new item to the list WebSphere Commerce Version 7.0.0.0Feature Pack 1Add a wcfPropertyValue class to your property definition. For example, if you have a weight measure property that includes weight measures such as kilograms and milligrams, you can add a weight measure for grams.
    <wcfPropertyDefinition propertyName="xprop_weightMeasure"> 
    <!--- Include a new weight measure for Grams -->
        <wcfPropertyValue displayName="Gram" value="GRM"/> 
        <wcfPropertyValue displayName="${catalogResources.catalogEntryWeightMeasure_Kilogram.string}" value="KGM"/> 
        <wcfPropertyValue displayName="${catalogResources.catalogEntryWeightMeasure_Milligram.string}" value="LBR"/> 
        <wcfPropertyValue displayName="${catalogResources.catalogEntryWeightMeasure_1_Unit.string}" value="C62"/> 
    </wcfPropertyDefinition> 

    Ensure that your resource bundle for the display text includes the new key for the new display name, such as Grams.

    Introduced in Feature Pack 2Add a new item to the list Introduced in Feature Pack 2Add a <PropertyValue> tag to your property definition. For example, if you have a weight measure property that includes weight measures such as kilograms and milligrams, you can add a weight measure for grams.
    <PropertyDefinition propertyName="xprop_weightMeasure">
       <!--- Include a new weight measure for Grams -->
       <PropertyValue displayName="Gram" value="GRM"/> 
       <PropertyValue
          displayName="${catalogResources.catalogEntryWeightMeasure_Kilogram}"
          value="KGM"/> 
        <PropertyValue
          displayName="${catalogResources.catalogEntryWeightMeasure_Milligram}"
          value="LBR"/> 
        <PropertyValue
          displayName="${catalogResources.catalogEntryWeightMeasure_1_Unit}"
          value="C62"/> 
    </PropertyDefinition>
    WebSphere Commerce Version 7.0.0.0Feature Pack 1Change the name of a list item WebSphere Commerce Version 7.0.0.0Feature Pack 1Change the display name of an existing list item. The display name is the list item text that is shown to the business user in the Management Center user interface. Change the display name within the wcfPropertyValue class of your property definition. For example, to change a list item named One year to 365 days, change the value of the key in your resource bundle for the display text from One year to 365 days.
    Introduced in Feature Pack 2Change the name of a list item Introduced in Feature Pack 2Change the display name of an existing list item. The display name is the list item text that is shown to the business user in the Management Center user interface. Change the display name within the PropertyValue element of your property definition. For example, to change a list item named One year to 365 days, change the value of the key in your resource bundle for the display text from One year to 365 days.

What to do next

After you complete your customization:
Version Steps
  1. Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent directory. This setting is the default environment setting.
  2. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  3. Deploy your changes to your production environment.
Introduced in Feature Pack 2
  1. Test your changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  2. Deploy your changes to your production environment.