Data Request

Top  Previous  Next

The need for data in a page is expressed with a dataRequest configuration element in the page configuration.

A Data Request actually defines which data source is responsible to provide the data in an ADOM and how the data populated in the ADOM is transferred to the Page XML Data. Remember ADOMs are data objects of MoreMotion and they are usually generated by the data service classes.

See Data Source Configuration.

dataRequest Element

  <dataRequest name="" dataSource="" selectAll="" sourceAreas="" 
                extraItemsBefore="" extraItemsAfter="">
    <node name="" newName="" encrypt="" />
    <node name="" newName="" encrypt="" />
  </dataSource>  

 
Attributes of dataRequest Element

name Attribute

Defines the name of the root level node of the data in the Page XML Data.

dataSource Attribute (Accepts MScript)

The name of the configuration element that defines a data source. If the name of the data source is identical with the name of the data request then this attribute can be omitted.

selectAll Attribute (Accepts MScript)

If all the nodes of the ADOM should be transferred to the Page XML Data then the value of this attribute must be true. If only some of the nodes should be transferred then the value must be false and for each node to transfer a node element should be used.

sourceAreas Attribute (Accepts MScript)

The value of this attribute should specify the names of the RefreshableArea elements (separated with commas) that the  data which is requested by this data request is used in.

Attribute (Accepts MScript)

This attribute can be used to add extra <item extra="before"/> nodes on the top of the item nodes obtained from the data source. The value of the attribute must be an positive integer.

extraItemsAfter Attribute (Accepts MScript)

This attribute can be used to add extra <item extra="after"/> nodes at the bottom of the item nodes obtained from the data source. The value of the attribute must be an positive integer.

The nested node Element

A dataRequest element may contain one or more node child elements. Each node element defines how an ADOM node should be transferred to Page XML Data. If all the data nodes provided by the data service need to be included into the data request as they are then there is no need to use this element.

Attributes of node Element

name Attribute

The name of the data node to transfer to the Page XML Data

newName Atrribute (Accepts MScript)

The name of the node in the Page XML Data. If this parameter is omitted then the name of the Page XML Data node will be the same as the node name in the ADOM.

encrypt Attribute (Accepts MScript)

This attribute should contain true or a encryption key if the value of the data node needs to be encrypted in the Page XML Data. If true is used as the value then the encryption key is the value of the newName attribute if available or name attribute otherwise. Please note that if the encrypted values are used as the parameters in the next request then the encrypted values should be decrypted using Page Command Definitions.