You can add or remove properties from the search test results list output. For example, if your site includes manufacturer name in search results, you can add that property to the results list output of your search tests.

You can customize the following sections of the results list output:

Before you begin, make sure the properties that you are adding to the search test output meet the following conditions:

To customize the search test results list output:

  1. Create an application module for your customizations. See Creating a New Application Module in the ATG Platform Programming Guide.

    ATG recommends that you create a new module to ensure that you always have a working application and to avoid issues when you upgrade.

  2. Copy the JSP files that you want to customize to your module.

    The results list output JSP files are located in the DCS-UI.Search module at:

    <ATG9dir>/DCS-UI9.1/DCS-UI/Search/j2ee-apps/DCS-UI-Search.ear/
    DCS-UI-Search.war/searchTesting/output

    The out-of-the-box files are named:

    • resultTableHeader.jsp – The result item table heading.

    • resultTableRow.jsp – The result item row.

    • resultTableSecondaryProperties.jsp – The result item secondary properties.

    • subTableHeader.jsp – The result sub-item table heading.

    • subTableRow.jsp – The result sub-item row.

    Rename your version of each file to avoid confusion, for example, myResultTableHeader.jsp.

  3. Edit the JSP files to add or remove properties from the output. If you edit the result row or sub-item row JSP, be sure to also edit the corresponding table heading JSP.

    The out-of-the-box JSP files rely on property mappings that map the search response XML properties to Search Testing UI properties. See Property Mappings between Search Testing and the Search Response XML.

    You can add new mappings or just refer directly to the search response properties. The following example retrieves the value of a custom property named myProperty from the search results:

    <dspel:getvalueof bean="${result.document.properties["myProperty"]}"/>

    To support localization, the table heading JSP files take heading names from a resource bundle. The resource bundle is located at:

    <ATG9dir>/AssetUI/Search/lib/classes.jar/atg/search/web/
    assetmanager/WebAppResources.properties

  4. Override the SearchTestingFormHandler component to update the pageConfigMap property with your new JSP files. There are two things you must specify in the mapping:

    • The name and location of the new JSP file.

    • The web application context root for the file. (The context identifies your web application so the DSP include can include that file.)

    The following shows an example of the pageConfigMap property with updated JSP files for a custom result table header and result row:

    pageConfigMap+=\
    resultTableHeaderPage=/custom/myResultTableHeader.jsp,\
    resultTableHeaderContext=DCS-UI-Search,\
    resultTableRowPage=/custom/myResultTableRow.jsp,\
    resultTableRowContext=DSC-UI-Search,\

    For more information about overriding a component, see the ATG Platform Programming Guide.

  5. Assemble the Merchandising application and include your module in the modules list. See Assembling a Merchandising Application.

  6. Deploy and start Merchandising.

  7. Verify that the properties you added to the results list output appear as expected.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices