The following steps provide information on how to add, delete or reorder columns.

Adding a Column
Removing a Column
Reordering Columns
Example: Adding a New Column to the Order Search Results
  1. Create a new column as outlined above in the Adding a Column section.

  2. Add your new column to the order-output-config.xml file. Adding the store-as-meta-index parameter allows your search engine to store the data within this column in a sort-enabled format. For example, to add a Last Modified column, you would create the following:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE item PUBLIC "-//Art Technology Group, Inc.//DTD Repository
    Ouput Specifier 1.0//EN" "http://www.atg.com/dtds/search/indexing-
    dependency-schema.dtd">

    <item item-descriptor-name="order">
    <meta-properties>
    <property name="lastModifiedDate" type="date" store-as-meta-
    index="false" />
    </meta-properties>
    </item>

  3. Run the /dyn/admin/nucleus/atg/commerce/search/
    OrderOutputConfig/bulkload
    method.

  4. Create a property file for the new column in the /atg/commerce/custsvc/ui/
    tables/order/search
    directory. Using the LastModifiedDate example, you would create a /atg/commerce/custsvc/ui/tables/order/search/
    LastModified.properties
    file. For example:

    $class=atg.svc.agent.ui.tables.ColumnConfiguration

    field=lastModified
    sortField=lastModifiedDate
    width=5em
    resourceBundle=acme.resources.Resources
    resourceKey=lastModifiedDate
    defaultSort=descending
    isVisible=true

    dataRendererPage=/atg/commerce/custsvc/ui/tables/order/search/
    LastModifiedRendererPage

  5. Create a new dataRendererPage property file in the location indicated in the new column property file you just created. This file will identify the URL page to use, as well as the context application.

    Using the previous example, you would create a /atg/commerce/custsvc/ui/
    tables/order/search/LastModifiedRendererPage.properties
    file that contained the following:

    $class=atg.web.PageFragment

    URL=/panels/order/search/lastModifiedRenderer.jsp
    servletContext=/Sample-DCS-CSR-App

  6. Create the new JSP file at the location identified above in the URL parameter.

    When you create the JSP file use the isHeading parameter to determine whether to render a heading or a data row. If rendering a heading you can display the heading title or information can be passed into the orderSearchResultSortHeading.jsp file, which allows users to sort on this column. Note: The sortField used must be the same as what is used in the XML file because this parameter is passed to the search engine. For example:

    <%--
    Last modified date renderer example for order search table
    @version $Id: //application/DCS-CSR/main/sample-app/src/web-apps/Sample-
    DCS-CSR-App/panels/order/search/lastModifiedRenderer.jsp $
    @updated $DateTime: 2009/04/01 11:29:04 $
    --%>
    <%@ include file="/include/top.jspf"%>
    <dsp:page>
    <fmt:bundle basename="acme.resources.Resources">
    <dsp:getvalueof var="field" param="field"/>
    <dsp:getvalueof var="sortField" param="sortField" />
    <dsp:getvalueof var="orderItemMap" param="orderItemMap"/>
    <dsp:getvalueof var="isHeading" param="isHeading" />
    <dsp:getvalueof var="resourceBundle" param="resourceBundle" />
    <dsp:getvalueof var="resourceKey" param="resourceKey" />
    <c:if test="${empty isHeading}">
    <c:set var="isHeading" value="false" />
    </c:if>
    <c:choose>
    <c:when test="${field == 'lastModified' and isHeading=='false'}">
    <c:out value="${orderItemMap.lastModifiedDate}" />
    </c:when>
    <c:when test="${field == 'lastModified' and isHeading=='true'}">
    <dsp:include src="/panels/order/orderSearchResultSortHeading.jsp"
    otherContext="${CSRConfigurator.contextRoot}">
    <dsp:param name="resourceBundle" value="${resourceBundle}"/>
    <dsp:param name="resourceKey" value="${resourceKey}"/>
    <dsp:param name="fieldName" value="${sortField}"/>
    </dsp:include>
    </c:when>
    <c:otherwise>
    </c:otherwise>
    </c:choose>
    </fmt:bundle>
    </dsp:page>

  7. Create the new table column configuration and add the new column information by creating a /atg/commerce/custsvc/order/OrderSearchUIConfiguration.
    properties
    file. The following example extends the default values by identifying the number of results per page, as well as enabling search on the new column:

    $class=atg.svc.agent.ui.tables.TableConfiguration
    $scope=global

    columns=\
    /atg/commerce/custsvc/ui/tables/order/search/Toggle,\
    /atg/commerce/custsvc/ui/tables/order/search/ViewLink,\
    /atg/commerce/custsvc/ui/tables/order/search/LastName,\
    /atg/commerce/custsvc/ui/tables/order/search/FirstName,\
    /atg/commerce/custsvc/ui/tables/order/search/Total,\
    /atg/commerce/custsvc/ui/tables/order/search/ItemsReturned,\
    /atg/commerce/custsvc/ui/tables/order/search/DateSubmitted,\
    /atg/commerce/custsvc/ui/tables/order/search/LastModified,\
    /atg/commerce/custsvc/ui/tables/order/search/Originator,\
    /atg/commerce/custsvc/ui/tables/order/search/State,\
    /atg/commerce/custsvc/ui/tables/order/search/WorkOn

    rowsPerPage=3

    defaultSortField^=/atg/commerce/custsvc/ui/tables/order/search/
    LastModified.sortField
    defaultSortDirection^=/atg/commerce/custsvc/ui/tables/order/search/
    LastModified.defaultSort

 
loading table of contents...