Registering the store feature in the Store Management tool

In this lesson, you will register the new feature in the Management Center Store Management tool to make it configurable from the Store Management tool.

About this task

Register the new feature by updating the property view definition files for the Madisons starter store. You will:
  • Define a new tab for the feature, and
  • Define a new check box for the feature.
The check box is then used to enable and disable the feature. During this lesson, you will define new objects associated with the new data in the EMSPOT and DMEMSPOTDEF database. The Management Center configuration objects for the feature are linked to the database entry by the Name attribute

Procedure

  1. 1. Create a property file to the store information that to display in the Management Center for the new feature:
    1. In the Enterprise Explorer view, navigate to LOBTools > src.
    2. Right click src folder and create a package named com.mycompany.commerce.store.client.lobtools.properties.
    3. Right click the new package and create a file called StoreLOB_en_US.properties.
    4. Open StoreLOB_en_US.properties property file for editing.
    5. Add the following code snippet to file:
      ContactToolTipPanel=Contact Tooltip.
      	ContactToolTipPanel.title=Contact Tooltip.
      	ContactToolTipPanel.description=Select this option to enable Contact Tooltip feature.
      	ContactToolTipPanel.checkboxEnable.title=Allow customers to enable Contact Tooltip feature.
      	ContactToolTipPanel.checkboxEnable.label=Enable New Feature.
    6. Save your changes and close the file.
  2. Import the new property file Resource Bundle:
    1. In the Enterprise Explorer view, navigate to LOBTools > WebContent > config > commerce > store > propertiesViews > Madisons.
    2. Open StoreFlexFlowPropertiesView.def for editing.
    3. locate the following line of code:
      <ResourceBundle definitionName="stoFlexFlow_10001" baseName="tools.stores.Madisons.devtools.flow.ui.config" />
    4. Append the following line of code:
      <ResourceBundle definitionName="stoFlexFlowExt_10001" baseName="com.mycompany.commerce.store.client.lobtools.properties.StoreLOB" />
    5. Save your changes.
  3. Define the new tab in the properties view for the Madisons starter store.
    1. In the StoreFlexFlowPropertiesView.def file, define the new PropertyTabPane object:
      1. Locate the following line of code:
        <ObjectProperties definitionName="stoStoreProperties_10001" componentObjectNames="selectedStaticPage">
        							<PropertyTabs name="Tabs">
      2. Add the following code snippet at the end of the above code block:
        <PropertyTabPane name="ContactTooltip" text="${stoFlexFlowExt_10001.ContactToolTipPanel.title}">
         <PropertyPane baseDefinitionName="stoStoreContactTooltipFlexFlow_10001"/>
        </PropertyTabPane>
    2. Add the new PropertyPane object definition:
      1. Locate the following code snippet:
        <PropertyPane definitionName="stoStoreLocatorFlexFlow_10001" >
         <PropertyGroup name="group" collapsable="false" >
          <PropertyStaticText text="${stoFlexFlow_10001.StoreLocatorPanel.description}" />
          <PropertyCheckbox name="StoreLocator.checkbox" promptText="${stoFlexFlow_10001.StoreLocator.checkbox.label}" objectPath="StoreFlow[name=StoreLocator]" propertyName="enabled" />
         </PropertyGroup>
        </PropertyPane>
      2. Append the following code snippet:
        <PropertyPane definitionName="stoStoreContactTooltipFlexFlow_10001" >
         <PropertyGroup name="group" collapsable="false" >
          <PropertyStaticText text="${stoFlexFlowExt_10001.ContactToolTipPanel.description}" />
          <PropertyCheckbox name="ContactTooltip.checkbox" helpText="${stoFlexFlowExt_10001.ContactToolTipPanel.checkboxEnable.title}" promptText="${stoFlexFlowExt_10001.ContactToolTipPanel.checkboxEnable.label}" objectPath="StoreFlow[name=ContactDisplayToolTip]" propertyName="enabled" />
         </PropertyGroup>
        </PropertyPane>
    3. Save your changes and close the file.
  4. Add the store text for the new feature in the storetext_en_US.properties file.
    1. In the Enterprise Explorer view, navigate to Stores > src > Madisons.
    2. Open storetext_en_US.properties for editing.
    3. Add the following line to the file:
        CONTACT_LINK = ContactTooltip
    4. Save your changes and close the file.
  5. Restart the WebSphere Application Server.

Results