The page developer is responsible for inserting the targeter servlet bean that implements the slot into a site page. This example uses the TargetingFirst
bean; any targeting bean will work.
In short, the investor home page pulls from the QFOfferSlot
the first item that complies with the slot’s properties. That item displays as an image URL and links to offer.jsp
.
To view how a slot is rendered in the investor home page:
Open
investorhome.jsp
in<ATG2007.3dir>/DSSJ2EEDemo/j2ee-apps/QuincyFunds/web-app/en.
Locate the first instance of the
TargetingRange
bean, which is used to locate items in the Features repository.
<dsp:droplet name="/atg/targeting/TargetingFirst"> <dsp:param bean="/atg/registry/Slots/QFOfferSlot" name="targeter"/> <dsp:param name="howMany" value="1"/> <dsp:param name="fireContentEvent" value="false"/> <dsp:param name="fireContentTypeEvent" value="false"/> <dsp:oparam name="output"> <dsp:a href="offer.jsp"> <dsp:param name="ElementId" param="element.repositoryId"/> <img border="0" src="<dsp:valueof param="element.imageURL"/>"></dsp:a> </dsp:oparam> </dsp:droplet>
Here’s description of the essential tags:
| Invokes the |
| Instructs the servlet bean to execute the |
| In conjunction with the servlet bean ( |
| Renders the located offer items as output available for display. |
| Displays the image identified in the offer’s |