Looks up an item in one or more repositories based on the item’s ID, and renders the item on the page.

Class Name




Required Input Parameters


The ID of the item to look up.


A key that maps to a secondary set of repositories.

Optional Input Parameters


The repository to search.

Note: Use of this parameter is not recommended. Instead, you should define different instances of the ItemLookupDroplet for each set of repositories.


The name of the item descriptor to use to load the item.

Note: Use of this parameter is not recommended. Instead, you should specify the item descriptor in the itemDescriptor property of the servlet bean.

Output Parameters


Set to the RepositoryItem corresponding to the ID supplied.


Any exception that might occur while looking up the item.

Open Parameters

The following list describes the output and open parameters of the ItemLookupDroplet.


Rendered if the item is found in the repository.


Rendered in all other cases, such as item not found, site visitor did not specify a required parameter.

Usage Notes

ItemLookupDroplet displays items in a repository. If your site uses more than one repository, you can create multiple instances of this servlet bean and configure each one differently. The repository and item descriptor type can be set through properties. If the useParams property is true, then the repository and item descriptor are resolved through input parameters. You can configure this servlet bean to define a mapping from a key to an alternate set of repositories.

For example, a ItemLookupDroplet servlet bean named ProductLookup might have the following properties:




The servlet bean can then be invoked with the following parameters:

<dsp:droplet name="/atg/commerce/catalog/ProductLookup">
    <dsp:param name="id" param="productId"/>
    <dsp:param bean="/OriginatingRequest.requestLocale.localeString"
    <dsp:setvalue param="product" paramvalue="element"
    <dsp:oparam name="output">
      <dsp:getvalueof var="a11" param="product.template.url"
      <dsp:a href="${a11}">
         <dsp:param name="prod_id" param="product.repositoryId"/>
         <dsp:valueof param="product.displayName"/>

If the mapping for the provided key is found, that repository is used. Otherwise, the system falls back to the default repository and searches for the item.

If the item cannot be found in the repository searched (such as the French product catalog), then the servlet again falls back to the default repository and tries to find the item with the same ID. This is only useful if the items have the exact same ID in each repository.

For example, you might view the site in French and try to look at product 1234. If the ID is defined in the French product catalog, you see the French version of that product. However, if 1234 is not defined, then you see the default English version of product 1234.

This behavior can be modified with use of the useDefaultRepository and getDefaultItem properties. If useDefaultRepository is false and an alternate repository cannot be found, then no repository is searched and empty is used. The same is true if an alternative repository is selected, but the item cannot be found and if getDefaultItem is false.

loading table of contents...