The ATG Platform and Commerce Reference Store use Oracle Endeca Commerce’s existing ResultsList cartridge with some extensions to the cartridge’s handler class, described below.

The DAF.Endeca.Assembler module configures the /atg/endeca/assembler/cartridge/handler/ResultsList component to use the atg.endeca.assembler.cartridge.handler.ResultsListHandler class. The atg.endeca.assembler.cartridge.handler.ResultsListHandler class extends the com.endeca.infront.cartridge.ResultsListHandler class and includes an additional sorters property that is an array of com.endeca.infront.cartridge.model.SortOptionConfig components. These SortOptionConfig components perform the actual results sorting.

The atg.endeca.assembler.cartridge.handler.ResultsListHandler.setSorters() method invokes the java.util.Arrays.asList() method on the sorters array to transform the array into a List of com.endeca.infront.cartridge.model.SortOptionConfig components. It then passes that List when it calls the com.endeca.infront.cartridge.model.SortOptionConfig.setSortOptions() method to set the sort options. This technique of creating an array and then using it to create a List of components is necessary because Nucleus cannot set a List of components directly.

Out of the box, the Store.Endeca.Assembler module sets the ResultsList component sorters property as follows:

sorters=\
  /atg/endeca/assembler/cartridge/sort/Relevance,\
  /atg/endeca/assembler/cartridge/sort/NameAscending,\
  /atg/endeca/assembler/cartridge/sort/NameDescending,\
  /atg/endeca/assembler/cartridge/sort/PriceAscending,\
  /atg/endeca/assembler/cartridge/sort/PriceDescending

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