Class Name

atg.repository.servlet.ItemLookupDroplet

Component(s)

/atg/commerce/catalog/CategoryLookup

/atg/commerce/catalog/MediaLookup

/atg/commerce/catalog/ProductLookup

/atg/commerce/catalog/SKULookup

/atg/commerce/gifts/GiftitemLookupDroplet

/atg/commerce/gifts/GiftlistLookupDroplet

/atg/commerce/location/StoreLookupDroplet

Servlet beans instantiated from the ItemLookupDroplet class use an item’s ID to look up the item in one or more repositories and render the item on the page. For more information about its various input, output, and open parameters, see the ItemLookupDroplet entry in Appendix B: ATG Servlet Beans in the ATG Page Developer's Guide.

Example

The following code example demonstrates how to use the GiftlistLookupDroplet to look up a gift list in the repository and check that its owner ID equals the ID of the current profile before displaying.

<dsp:droplet name="/atg/commerce/gifts/GiftlistLookupDroplet">
 <dsp:param param="giftlistId" name="id"/>
 <dsp:oparam name="output">
   <dsp:droplet name="IsEmpty">
     <dsp:param param="element" name="value"/>
     <dsp:oparam name="false">
        <dsp:setvalue paramvalue="element" param="giftlist"/>
        <dsp:droplet name="/atg/dynamo/droplet/Switch">
        <dsp:param bean="Profile.id" name="value"/>
        <dsp:getvalueof id="nameval2" param="giftlist.owner.id"
                    idtype="java.lang.String">
<dsp:oparam name="<%=nameval2%>">
        </dsp:oparam>
</dsp:getvalueof>
        </dsp:droplet>
     </dsp:oparam>
   </dsp:droplet>
 </dsp:oparam>
</dsp:droplet>

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