Tutorials > Sales Center > Add an editable column to the Order Items table by creating a new widget manager
Verify the ShowStore BOD
In this step of the tutorial, you verify the code.
Procedure
- Update the IBM Sales Center registry
BODs consist of nouns and verbs. The IBM Sales Center registry file (TelesalesRegistry.xml) defines which class runs for different noun-verb combinations.
Further on in this page, you can see the mapping between the ShowStore\GetStore noun-verb pair and com.ibm.commerce.telesales.messaging.bodreply.ShowStore class. Whenever the IBM Sales Center client tries to get a ShowStore object, the class com.ibm.commerce.telesales.messaging.bodreply.ShowStore runs.
<Noun name="Store"> <Verb name="Get"> <ClassName>com.ibm.commerce.telesales.messaging.bodreply.ShowStore</ClassName> </Verb> </Noun>
In this tutorial, you want the new com.mynewextensions.fulfillmentcenter.ExtendedShowStore class to run instead of the com.ibm.commerce.telesales.messaging.bodreply.ShowStore class. You need to create the own custom registry file and add a reference to the new file in the wc-server.xml file. You should not make changes directly to the TelesalesRegistry.xml file because those changes might be overwritten in a fix pack or migration.
To create a new custom registry file:
- Navigate to WC_EAR\xml\messaging.
- Make a copy of the TelesalesRegistry.xml file, name the copy TelesalesRegistry-ext.xml. Edit the TelesalesRegistry-ext.xml file so that only the following lines remain
<WCTBodResponseBuilderRegistry> <Noun name="Store">
- Save the changes.
- Update the wc-server.xml file with a reference to the new registry file:
- Navigate to WC_EAR\xml\config.
- In the wc-server.xml file, find the following text:
<component compClassName="com.ibm.commerce.telesales.configuration.TelesalesRegistryComponentConfiguration" enable="true" name="Telesales Response Builder Registry Configuration"> <property baseRegistryFileName="TelesalesRegistry.xml" baseRegistryFilePath="messaging" customRegistryFileName="" customRegistryFilePath="" display="false" enableBaseRegistryOverride="false"/> </component>
- Add the text in bold font:
<component compClassName="com.ibm.commerce.telesales.configuration.Telesales RegistryComponentConfiguration" enable="true" name="Telesales Response Builder Registry Configuration"> <property baseRegistryFileName="TelesalesRegistry.xml" baseRegistryFilePath="messaging" customRegistryFileName= "TelesalesRegistry-ext.xml" customRegistryFilePath= "messaging" display="false" enableBaseRegistryOverride= "true"/> </component>
- Restart the WebSphere Commerce Test Server to pick up the change to wc-server.xml.
- Test the changes
- Delete all the BODs from the bodmessages directory as determined in Step 8.
- From the IBM Sales Center development environment, run the IBM Sales Center client. Select and open the ConsumerDirect Store as shown:
- Check the bodmessages directory, and open the ShowStore BOD. You should see the fulfillment centers that are in the database. In this tutorial, there were three fulfillment centers as shown below: