Tag: getData

The wcf:getData tag retrieves data objects from a WebSphere Commerce service. The wcf:param tag and the wcf:contextData tags are elements of the wcf:getData tag.

Tag information Value
Body Content scriptless
Display Name Get Data


Attributes

Name Required Request-time Type Description
var true false java.lang.String The name of the exported scoped variable assigned the data that is retrieved from the WebSphere Commerce service. That is, the name of the variable that will hold the getData result. The type of variable is specified by the type attribute.
type true false java.lang.String The data type of the data that is to be retrieved. This value must be a fully qualified interface name of a noun SDO that is to be retrieved using the configured client facade. If the type is appended with "[]", then the variable specified by the var attribute is an array. Otherwise, the variable is not an array and is set to the first value found when the WebSphere Commerce service is invoked.
scope false false java.lang.String The scope for the variables specified by var and varShowVerb. Valid scope values are page, request, session, and application. Default is page.
expression false true java.lang.String The search expression that retrieves the data. This expression must be a valid search expression for the configured component service. This attribute must not be specified when the expressionBuilder attribute is specified.
expressionLanguage false true java.lang.String The expression language that interprets the value of the expression attribute. Default is _wcf:XPath. This attribute must not be specified when the expressionBuilder attribute is specified.
expressionBuilder false true java.lang.String The name of a configured expression builder. The expression builder composes the search expression and set the expression language. This attribute must not be specified when the expression attribute is specified. Named parameter values for the expression builder might be specified using the wcf:param element. The expressions are defined in the get-data-config.xml file for each component.
recordSetReferenceId false true java.lang.String The reference ID for this query. The value of the reference ID can be retrieved from the Show verb object stored in the variable specified by the varShowVerb attribute. Based on the paging parameters like recordSetReferenceId and recordSetStartNumber, the reference ID returns the exact page of records from the total set of records returned by the SQL.
recordSetStartNumber false true java.math.BigInteger The starting index from which to retrieve results from the result set.
maxItems false true java.math.BigInteger The maximum number of items to return.
varShowVerb false false java.lang.String The name of the exported scoped variable that holds the Show verb object that is retrieved from the WebSphere Commerce service. The type of variable is com.ibm.commerce.oagis9.datatypes.ShowType. The Show verb can contain the following status information about the result set:

  • recordSetReferenceId - The internal identifier for the result set, so that it can be resolved on a subsequent request.

  • recordSetCompleteIndicator - Indicates whether you reached the end of the result set.

  • recordSetTotal - The total number of results in the result set.

  • recordSetCount - The number of records from the result set that are being returned in this message.

  • recordSetStartNumber - The starting index for the results that are being returned in this message.

varException false false java.lang.String The name of the exported scoped variable where the exception object is stored. This value is set only when an exception occurs while the expression builder or WebSphere Commerce service is invoked. The type of the exported variable is com.ibm.commerce.foundation.client.facade.bod.AbstractBusinessObjectDocumentException


Variables

No variables are defined for the wcf:getData tag.


Example

The following example uses the wcf:getData tag to retrieve the order object for the current shopping cart and assign it to a variable called "order":


Related reference
GetData tag configuration
WebSphere Commerce foundation tag library