Configuring Catalog boundaries to prevent unbound exceptions

The catalog subsystem defines business object values for product search results. The default values are defined in the xml/config/com.ibm.commerce.catalog/wc-admin-component.xml file. Limit controls are disabled by default. You can enable it by changing the values to meet your business needs.

Procedure

  1. Open the xml/config/component-id/wc-admin-component.xml file.
    The default values are shown in the following code snippet:
    <_config:extendedconfiguration>
         <_config:configgrouping name="ProductSearchThreshold">
              <_config:property name= "defaultPageSize" value = "10" />
              <_config:property name= "maxPageSize" value = "0" />
              <_config:property name= "maxResultSize" value = "0" />
         </_config:configgrouping>
    </_config:extendedconfiguration>
    
    where:
    ProductSearchThreshold
    defaultPageSize
    The number of catalog products displayed on the storefront when no paging parameters are passed.
    maximumPageSize
    The maximum number of catalog products displayed on a page in the storefront. The default value is 0, denoting unlimited limits. If you do not need to control the limit on catalog search results, you can leave the value as 0.
    maximumResultSize
    The maximum number of catalog products retrieved from the database, pertaining to a search criteria. The default value is 0, denoting unlimited limits. If you do not need to control the limit on catalog search results, you can leave the value as 0.
  2. Save and close the file.

What to do next

If you are using customized JSP files from WebSphere Commerce Version 6 in your WebSphere Commerce Version 7 store, you must modify your JSP files to refer to the pageSize set by the beans.

That is, you must change references of pageSize to references of catEntSearchListBean.pageSize in your JSP files.

For example, change:

<c:set var="prevPageIndex" value="${catEntSearchListBean.beginIndex - pageSize}"/>
to:

<c:set var="prevPageIndex" value="${catEntSearchListBean.beginIndex - catEntSearchListBean.pageSize}"/>