Adding a dynamic list

About this task

The following files are created or modified by creating a dynamic list.

Files created:

  • a dynamic list definition XML file, myDynamicList.xml to describe the frameset
  • resource bundle files, for example MyDynamicListResource_locale.properties
  • HTML help files for your users
  • myDynamicList.jsp to fill panel contents

Files modified:

To add a dynamic list:

Procedure

  1. Create a dynamic list definition XML file that describes the frameset. Create the file, for example named newDynamicList .xml in the directory
    • WC_installdir/xml/tools/component
    • WebSphere Commerce Developer workspace_dir/wc/xml/tools/component

    where component is the name of the component to which the dynamic list belongs.

    For more information, see Dynamic list definition.


  2. Register the dynamic list definition XML file in the appropriate resources.xml file. Multiple versions of this file exist, one for each component, in the following directory:

    • WC_installdir/xml/tools/componentname /resources.xml
    • WebSphere Commerce Developer workspace_dir/wc/xml/tools/componentname/resources.xml

    Make an entry similar to the following code fragment in resources.xml:

    
    <XML name="sampleList" file="sample/sampleList.xml"/> 
    

    The name attribute becomes a key which will be used in a later step.

    Since the WebSphere Commerce configuration file references the resources.xml files, you must also update the WebSphere Commerce configuration file to register any new resources.xml files.

  3. If necessary write the JSP file and JavaScript file that define your dynamic list page. Java methods from the class com.ibm.commerce.tools.common.ui.taglibs.comm should be used to create your dynamic list table. For a list of these methods see Dynamic list Java methods.

    Your custom JSP file, myDynamicList.jsp, must include the following JavaScript files:

    
    <SCRIPT SRC="/wcs/javascript/tools/common/Util.js"></SCRIPT>
    <SCRIPT SRC="/wcs/javascript/tools/common/dynamiclist.js"></SCRIPT>
    
  4. Add your new dynamic list to a Tools User Interface Center menu system. This step is optional, depending on whether you want to add your dynamic list to an existing menu. To add your new dynamic list to a Tools User Interface Center menu system, for example, WebSphere Commerce Accelerator, see Integrating tools into a Tools User Interface Center for more information.

  5. Create a resource bundle adding text that appears as the title of the dialog. These files are in the following directory:

    • WC_eardir/properties/com/ibm/commerce/tools/componentname/properties
    • WebSphere Commerce Developer workspace_dir/wc/properties/com/ibm/commerce/tools/componentname/properties

    where componentname is the component to which you are adding the dialog.

    If national languages are supported, create the national language resource bundles with the appropriate language text. The national language file names must end with the locale supported. For example, for a French-language resource bundle, the file name should be filename_fr_FR.properties

  6. Write context sensitive help files for your container element and panels and update a Tools User Interface Center help map XML file to include your help files. See Adding context-sensitive help into a Tools User Interface Center for more information.
  7. To launch and test your dynamic list, stop and start WebSphere Commerce and then test your new dynamic list. This is the URL of the newly created dynamic list: https://host_name:8000/webapp/wcs/tools/servlet/NewDynamicListView?ActionXMLFile=sample.sampleList&cmd=SampleListView