Built-in Data Sources

Top  Previous  Next

MoreMotion maintains a set of built-in data sources. There is no need to define them in the configuration. Since the names of these data sources are reserved they cannot be used for the user data sources.

In order to use the built-in data sources in a page it is enough to refer them by configuring dataRequest elements in the page configuration as follows.

Defining Data Requests in a Page Configuration:

  <root>
    ..
    <dataRequest name="request" selectAll="false">
      <node name="ID"/>
      <node name="COUNT"/>
    </dataRequest>
 
    <dataRequest name="servertime" selectAll="true"/>
  </root> 

Built-In Data Sources

request

The "request" data source provides the request parameters and their values. For example if the request is as follows

display.doms?pg=products&ID=5&COUNT=20&_rand=112233

 
then the data provided by the request data source will be as follows.

  <request>
    <pg>products</pg>
    <ID>5</ID>
    <COUNT>20</COUNT>
    <_rand>112233</_rand>
  </request>

 
The "request" data source also provides information about the current request.

  <request>
    <!-- Request Parameters -->
    <pg>products</pg>
    <ID>5</ID>
    <COUNT>20</COUNT>
    <_rand>112233</_rand>
 
    <!-- Information supplied by HttpServetRequest Object -->
    <ApplicationPath/>
    <AuthType/>
    <CharacterEncoding/>
    <ContentType/>
    <ContextPath/>
    <Method/>
    <PathInfo/>
    <PathTranslated/>
    <Protocol/>
    <QueryString/>
 
    <RemoteAddr/> <!-- IP Address of Requester Client -->
    <RemoteHost/>
    <RemoteUser/>
    <RequestURI/>
    <RequestedSessionId/>
    <Scheme/>
    <ServletPath/>
    <UserAgent/>
    <SessionId/>
    <Referer/>
 
    <!-- Additional Information supplied by MoreMotion AF -->
    <RefreshId/>   <!-- Refresh Identity. Its value is changed by the MoreMotion each time 
                        a new session is created or when the user logs in and logs out -->
    <BrowserIsXSLTCapable/>
    <XSLTInBrowser/>
    <SessionCount/> <!-- The number of open sessions --> 
  </request>

var

See Variable Pool.
See Page and Session Variables.

"var" data source provides the request parameters, pool variables, page variables and session variables.

An example "var" data source:

  <var>
    <!-- System variables maintained by the Process Manager -->
    <__nextpage>products<__nextpage>  <!-- The next page to be displayed -->
    <_maxcc>4</_maxcc>                <!-- Maximum Process Completion Code -->
 
    <!-- user variables -->
    <CNT>0</CNT>
    <record_exists>true</record_exists> 
    ...
  </var>

 

 

variants

The "variants" data source provides a list of the available variants of the current page.

  <variants>
    <option value="">*</option>
    <option value="de">de</option>
  </variants>

 

For each available variant of the current page there is an "option" element. "*" stands for the master page.

 
nextpage

The "nextpage" data source provides data in case of Page Redirection or Page Sequencing features are used. The "page" element contains the page(s) to be displayed next.

  <nextpage>
    <page>Page1,Page2,Page3</page>
  </nextpage>

 

pageinfo

The "pageinfo" data source provides some important information about the current page.

  <pageinfo>name:/products;lang:en;charset:iso-8859-1;GS:.;DS;,;sn:1</pageinfo>

name

Page Name

lang

Page Language

charset

Page Encoding

GS

Grouping Separator

DS

Decimal Symbol

sn

Session Number (Not the session Id).

Usually this information is transferred to the HTML DOM with the mo:pageinfo attribute either in body element for the normal requests, or in source area element for the Ajax requests.

  <body mo:pageinfo="{/root/pageinfo}">
 
  </body>

 
servertime

This data source provides time information of the server computer

  <servertime>
    <time>1132429171349</time>
    <zoneoffset>7200000</zoneoffset>
    <timestamp>12006-01-27 15:34:21</timestamp>
  </servertime>

"time" element keeps the current server time in milliseconds, "zoneoffset" keeps the raw offset from GMT in milliseconds and "timestamp" keeps the date and time as formatted sting.