Develop > Presentation layer > WebSphere Commerce foundation tag library
Tag: contextData
The contextData tag sets a business context data value for a WebSphere Commerce service request. Business context data values specified with the contextData tag are appended to any business context values associated with the current session. The new business context values are in effect only for the current WebSphere Commerce service request. They do not persist into the session. Use this tag only as a sub-tag of the getData tag.
Tag Information Body Content empty
Attributes Name 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 Defined.
Example
The following example retrieves the order object for the current shopping cart. The 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>
Related reference
WebSphere Commerce foundation tag library