Tag: contextData

The wcf:contextData tag sets a business context data value for a WebSphere Commerce service request. The business context data values specified with the wcf:contextData tag are appended to any business context values that are associated with the current session. The new business context values are in effect only for the current WebSphere Commerce service request. The values do not persist into the session. Use this tag only as a subtag of the wcf:getData tag.

Tag information

Tag information
Body Content empty

Attributes

Attributes

Attribute Required Request-time Type Description
name true true java.lang.String The name of the business context data value.
data true true java.lang.String The value of the business context data value.

Variables

No variables are defined for the wcf:contextData tag.

Example

The following example uses the wcf:getData tag to retrieve the order object for the current shopping cart. The wcf:contextData tag is used to explicitly set the storeId to "10001".
<wcf:getData
 type="com.ibm.commerce.order.facade.datatypes.OrderType"
 var="order" 
 expressionBuilder="findCurrentShoppingCart">
  <wcf:contextData name="storeId" data="10001" />
  <wcf:param name="accessProfile" value="WC_OrderDetailsProfile" />
</wcf:getData>