Adding context-sensitive help into a Tools User Interface Center

The following steps detail how to add context-sensitive help:

Procedure

  1. Create or modify the existing help HTML pages. The help pages for context-sensitive help, that is the help that displays when a user clicks Help from a browser-based tool, are in the following directory: WC_installdir\CommerceHelpSystem\eclipse\plugins\com.ibm.commerce.base.doc.
    1. Navigate to the directory:
      • WC_installdir\CommerceHelpSystem\eclipse\plugins\com.ibm.commerce.base.doc.
      • WebSphere Commerce Developer RAD_installdir\eclipse\plugins\com.ibm.commerce.base.doc

      This directory contains a file called doc.zip.

    2. Back up doc.zip if you want to retain the original help text.
    3. Extract doc.zip to a temporary directory, for example, C:\temp.
    4. The temporary directory contains a directory called f1. This directory contains all the context-sensitive help files.
    5. Modify existing files, or add new files to this directory.
    6. Compress the files back into a ZIP file using a ZIP compression utility.
    7. Copy the file into
      • WC_installdir\CommerceHelpSystem\eclipse\plugins\com.ibm.commerce.base.doc
  2. Stop and start the WebSphere Commerce Information Center.
  3. If the HTML page is new, that is, you created it in step 1:
    1. Define a help key by adding an entry to the help map XML file

      For WebSphere Commerce Accelerator, the help map file is WC_profiledir\xml\tools\common\AcceleratorHelpMap.xml.

      Add a line similar to the following code fragment:

      
      <helpkey default="MC.default.Help" path="/help/index.jsp?lang=$locale$&amp;topic=/com.ibm.commerce.base.doc/f1/">
      <help key="MC.notebook.panel1.Help" file ="sample_help1.html"/> 
      </helpkey>
      

      where MC.default.Help is the default help key, which acts as the main help page for cases in which no help key is defined, MC.notebook.panel1.Help is the name of the help key and sample_help1.html is the help file name.

      If you are working on a different Tools User Interface Center, find the help map XML file name by looking at the top of the tools center definition XML file in a line similar to the following code fragment:

      
      <menu helpMap="common.MerchantCenterHelpMap">
      
    2. Reference the help key in your element's defining XML file

      In your user interface element's XML, you must reference the help key. The method by which you reference the key depends on the user interface element you are creating.

      • If you are writing a panel inside of a notebook, a wizard, or a dialog, the help key is defined in the XML file as shown below:

        
        <panel name="Profile" url="/wcs/tools/sample/notebookPanel1.html" 
        helpKey="MC.notebook.panel1.Help" />
        
      • If you are writing a dynamic list page, the help key is defined in the XML file as shown below:

        
        <action l ... HelpKey="MC.order.orderList.Help" ... /> 
        
      • If your page is neither of the preceding types, you must define the following JavaScript function in your page:
        
        function getHelp() 
        { return "MC.myPage.Help "; }