The ProductList component, which maintains the list of Entry objects in its items property, also includes a reference to a TableInfo object in its tableInfo property. The TableInfo component maintains the display information to compare the products in table form, such as the properties to display in the table, the column headings for the table, and the sorting instructions for the table.

ATG Commerce provides one instance of TableInfo, located in Nucleus at /atg/commerce/catalog/comparison/TableInfo. By default, it is configured for use with the Motorprise Reference Application. Also by default, it is configured for use with ProductList (in ProductList.tableInfo).

Depending on the complexity of your commerce site, you may require multiple instances of ProductComparisonList and TableInfo. A simple site may offer the user a single product comparison list. A more complex site may offer the user multiple comparison lists to compare different types of items (for example, one list to compare cameras, a different list to compare televisions, and so on). In general, however, a site will maintain one instance of ProductComparisonList and one instance of TableInfo for each comparison table that’s desired.

For detailed information on TableInfo, refer to the Implementing Sortable Tables chapter in the ATG Page Developer’s Guide. For JSP examples of how to use the ProductList and TableInfo components to manage product comparisons, refer to Implementing Product Comparison chapter of the ATG Commerce Guide to Setting Up a Store. For an example of using multiple instances of TableInfo to manage a single product comparison table, refer to the Viewing Compare Results section of the Displaying and Accessing the Product Catalog chapter in the ATG Business Commerce Reference Application Guide.

 
loading table of contents...