Tutorials > Sales Center > Add an editable column to the Order Items table by creating a new widget manager

< Previous | Next >


Verify the ShowStore BOD

In this step of the tutorial, you verify the code.


Procedure

  1. 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:

  2. Navigate to WC_EAR\xml\messaging.

  3. 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">
    

  4. Save the changes.

  5. Update the wc-server.xml file with a reference to the new registry file:

    1. Navigate to WC_EAR\xml\config.

    2. 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>
      

    3. 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>
      

    4. Restart the WebSphere Commerce Test Server to pick up the change to wc-server.xml.

  6. Test the changes

    1. Delete all the BODs from the bodmessages directory as determined in Step 8.

    2. From the IBM Sales Center development environment, run the IBM Sales Center client. Select and open the ConsumerDirect Store as shown:

    3. 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:

< Previous | Next >


+

Search Tips   |   Advanced Search