Class Name |
|
---|---|
Component(s) |
|
Servlet beans instantiated from theItemLookupDroplet
class use an item’s ID to look up the item in a repository and then render the item. For repositories that are configured to do so, the ItemLookupDroplet
class will also determine if the item is appropriate for the current site context before rendering it. For more information about its various input, output, and open parameters, see the ItemLookupDroplet
entry in Appendix B: ATG Servlet Beans in the 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>