Class Name

atg.commerce.catalog.custom.CatalogPossibleValues

Component(s)

/atg/commerce/catalog/RepositoryValues

The CatalogPossibleValues servlet bean ensures that customer searches only return products from catalogs the customer can view.

Input Parameters

itemDescriptorName (Required)
This is the name of the item-descriptor in the repository XML file

catalog
The optional value that, if used, specifies a catalog ID. Only items located in the catalog specified here will be returned by the search. If you don’t specify a catalog, the catalog specified in the user’s profile is used.

propertyName
The optional value that, if used, must refer to a linked property. If this parameter is specified, repository items of the linked type will be returned.

repository
This parameter defines the repository to search. It can also be set via a properties file.

sortProperties
A string that specifies how to sort the list of repository items. This parameter is specified as a comma separated list of property names. The first name specifies the primary sort, the second specifies the secondary sort, and so on. If the first character of each keyword is a -, this sort is performed in descending order. If it is a + or it is not a -, it is sorted in ascending order. Note: This parameter is only valid for repository items, it will not work with enumerated data-types.

Output Parameter

values
Within the body of the output open parameter, this parameter is set to the list of possible values for the named item descriptor and property. The value will either be a list of tags (for enumerated properties) or an array of repository items.

Open Parameter

output
This parameter is rendered once with the results of the search.

Example

In this example, RepositoryValues is an instance of CatalogPossibleValues.

<dsp:droplet name="RepositoryValues">
 <dsp:param value="category" name="itemDescriptorName"/>
  <dsp:oparam name="output">
   <dsp:droplet name="ForEach">
    <dsp:param param="values" name="array"/>
    <dsp:param value="+displayName" name="sortProperties"/>
    <dsp:oparam name="output">
    <dsp:getvalueof id="option14" param="element.repositoryId"
                idtype="java.lang.String">
<dsp:option value="<%=option14%>"/>
</dsp:getvalueof>
    <dsp:valueof param="element.displayName"/>
   </dsp:oparam>
   </dsp:droplet>
  </dsp:oparam>
</dsp:droplet>

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