ClassName |
|
---|---|
Component |
|
The ProfileHasLastMarkerWithKey
servlet bean determines whether the last profile marker added to the profile with a particular key has the additional parameters you specify. These additional parameters can be specific values for the value
, data
, or other marker properties you specify. If the last marker with a particular key
matches the other parameters you specify, the true
open parameter is rendered and the marker is made available to the page through the marker
output parameter.
For more information on working with marked profiles, see the UsingMarkedProfiles section in the UsingProfileMarkers chapter of the ATG Personalization Programming Guide.
Input Parameters
itemId
Specifies the ID of the profile that has a marker you want to access. If none is specified here, the value indicated in the item
input parameter is used.
item
Specifies the profile item that has a marker you want to access. If none is specified here, the active profile is used.
key
This required parameter specifies the value in the marker’s key
property. By setting this parameter to ANY_VALUE, you indicate that the marker’s key
value is irrelevant for your purposes. For example:
<dsp:param name="key"
bean="ProfileHasLastMarkerWithKeyDroplet.ANY_VALUE"/>
value
Specifies the value in the marker’s value
property. You can set this parameter to NULL
or omit it all together if you want the marker to be returned only if its value
property is null. By setting this parameter to ANY_VALUE, you indicate that the marker’s value
value is irrelevant for your purposes. For example:
<dsp:param name="value"
bean="ProfileHasLastMarkerWithKeyDroplet.ANY_VALUE"/>
data
Specifies the value in the marker’s data
property. You can set this parameter to NULL
or omit it altogether if you want the marker to be returned only if its data
property is null. By setting this parameter to ANY_VALUE, you indicate that the marker’s data
value is irrelevant for your purposes. For example:
<dsp:param name="data"
bean="ProfileHasLastMarkerWithKeyDroplet.ANY_VALUE"/>
extendedProperties
This parameter is a map that specifies any additional marker properties (set to the map’s key
) and property values (set to the map’s value
) that must exist on the profile marker that is retrieved.
markerManager
This parameter indicates the Profile Marker Manager component to use. If a Profile Marker Manager is not specified here, the Profile Marker Manager indicated in the servlet bean’s repositoryMarkerManager
property is used.
markerPropertyName
Specifies the property on the profile that you want to check for markers. If a property is not specified here, the servlet bean uses the default value specified in its defaultMarkerPropertyName
property.
markedItemType
Specifies the type of RepositoryItem
that has markers you want to work with. If a repository item type is not specified here, the servlet bean uses the default value specified in its defaultMarkedItemType
property.
Output Parameters
marker
This parameter contains the marker located by the servlet bean.
errorMsg
This parameter contains any error messages generated during the servlet bean’s execution.
Open Parameters
error
This parameter is rendered when an error occurs during servlet bean execution.
true
This parameter is rendered when the last marker added with a certain key
matches the criteria you specify.
false
This parameter is rendered when the last marker added with a certain key
does not match the criteria you specify.
Example
This example shows how to determine if the last profile marker added to the current profile with a key
of partner has a value
of travel site A. Users who have such a marker see a message informing them about airfare discounts.
<dsp:droplet name="/atg/markers/userprofiling/droplet/ProfileHasLastMarkerWithKeyDroplet"> <dsp:param name="key" value="partner"/> <dsp:param name="value" value="travelSiteA"/> <dsp:param name="data" bean="ProfileHasMarkerWithKeyDroplet.ANY_VALUE"/> <dsp:oparam name="true"> When you book your hotel room with us, you'll receive a discount on airfare if you book your flight with travel site A! </dsp:oparam> </dsp:droplet>