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. Create a property file to the store information that
to display in the Management Center for the new feature:
- In the Enterprise Explorer view, navigate to .
- Right click src folder and create
a package named com.mycompany.commerce.store.client.lobtools.properties.
- Right click the new package and create a file called StoreLOB_en_US.properties.
- Open StoreLOB_en_US.properties property
file for editing.
- 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.
- Save your changes and close the file.
- Import the new property file Resource Bundle:
- In the Enterprise Explorer view, navigate to .
- Open StoreFlexFlowPropertiesView.def for
editing.
- locate the following line of code:
<ResourceBundle definitionName="stoFlexFlow_10001" baseName="tools.stores.Madisons.devtools.flow.ui.config" />
- Append the following line of code:
<ResourceBundle definitionName="stoFlexFlowExt_10001" baseName="com.mycompany.commerce.store.client.lobtools.properties.StoreLOB" />
- Save your changes.
- Define the new tab in the properties view for the Madisons
starter store.
- In the StoreFlexFlowPropertiesView.def file,
define the new
PropertyTabPane
object:
- Locate the following line of code:
<ObjectProperties definitionName="stoStoreProperties_10001" componentObjectNames="selectedStaticPage">
<PropertyTabs name="Tabs">
- 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>
- Add the new PropertyPane object definition:
- 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>
- 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>
- Save your changes and close the file.
- Add the store text for the new feature in the storetext_en_US.properties file.
- In the Enterprise Explorer view, navigate to .
- Open storetext_en_US.properties for
editing.
- Add the following line to the file:
CONTACT_LINK = ContactTooltip
- Save your changes and close the file.
- Restart the WebSphere Application Server.