ATG Commerce includes a preconfigured instance of the QueryFormHandler
, /atg/commerce/search/ProductCatalogQueryFormHandler
. You can use this form handler to create search forms for Commerce sites.
To create a new form handler component, determine which form handler class you need, and configure a request-scoped Nucleus component of that class. Set the following properties:
siteName
The name of the site, as shown under the Admin tab of the ATG Search Management Console.
searchService
TheESSearchServiceImpl
component to use. Any number of form handler components can use the sameESSearchServiceImpl
component.
searchContext
TheSearchContext
component to use to store state information between requests. (You must create this component and give it session scope, but there are no properties that you need to set.)
If the form handler class is QueryFormHandler
, and you are searching ATG repository items, you also need to set the activeSolutionZones
key of the form handler’s relQuestSettings
property. The value of this key should be a String that encodes the names of all the indexed properties as a comma-separated list.
The relQuestSettings
property is of type atg.nucleus.ResolvingMap
, a Map type that supports the Nucleus ^=
syntax for linking to property values of other components. This syntax makes it possible to set the activeSolutionZones
key by linking it to the textActiveZones
property of the IndexingOutputConfig
component, which contains the appropriate String. For example:
relQuestSettings=\
activeSolutionZones^=/MyStuff/MyIndexingOutputConfig.textActiveZones