ClassName

atg.markers.userprofiling.droplet.ProfileHasLastMarker

Component

/atg/markers/userprofiling/droplet/ProfileHasLastMarkerDroplet

The ProfileHasLastMarker servlet bean uses the Profile Marker Manager to determine whether the last profile marker added to a particular profile has the parameters you specify. For example, you can find out if the last marker includes specific values for its key, value, data or other properties. If the last marker has the indicated parameters, the true open parameter is rendered and marker is accessible 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 whose last 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 whose last 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. The last profile marker must have the value in its key property that you specify here. 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="ProfileHasLastMarkerDroplet.ANY_VALUE"/>

value
Specifies the value in the marker’s value property. The last profile marker must have the value in its value property that you specify here. You can set this parameter to NULL or omit it altogether 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="ProfileHasLastMarkerDroplet.ANY_VALUE"/>

data
Specifies the value in the marker’s data property. The last profile marker must have the value in its data property that you specify here. 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="ProfileHasLastMarkerDroplet.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 last profile marker in order for it to be 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 profile marker added to the profile has the property values you specified.

false
This parameter is rendered when the last profile marker added to the profile does not have the property values you specified.

Example

This example demonstrates how to locate the last profile marker on the current user profile. If the profile’s last profile marker has a key of partner, the servlet bean displays the partner’s name, which is stored in the marker value property, followed by is one of our favorite affiliates. Learn why!.

<dsp:droplet
 name="/atg/markers/userprofiling/droplet/ProfileHasLastMarkerDroplet">
   <dsp:param name="key" value="partner"/>
   <dsp:param name="value" bean="ProfileHasLastMarkerDroplet.ANY_VALUE"/>
   <dsp:param name="data" bean="ProfileHasLastMarkerDroplet.ANY_VALUE"/>

   <dsp:oparam name="true">
      <dsp:param name="marker">
         <dsp:valueof paramvalue="marker.value">
      </dsp:param>
      is one of our favorite affiliates. Learn why!
   </dsp:oparam>

</dsp:droplet>
 
loading table of contents...