Although it is best to explicitly define objects, the REST framework supports the ability to work with the following defined implicit objects:

Object

Description

request

This object maps to the current request.

session

This object maps to the user’s session.

param.name

Maps a request parameter name to a single string value.

paramValues.name

Maps a request parameter name to an array of string values.

objectParam.name

Maps a request parameter name to an object value.

header.name

Maps a header name to a single string value.

headerValues.name

Maps a header name to an array of string values.

cookie.name

Maps a cookie name to a cookie object.

atgActorModel

Maps the current actor-chain’s modelMap. This does not reference the parent chain’s modelMap.

nucleus

Maps a Nucleus component.

Accessing Actor Context Variables

Actor context variables and attributes are available only for the duration of the actor-chain. Each nested actor-chain or child actor-chain is given a new ActorContext and ModelMap, and is unable to reference their parent’s ActorContext and ModelMap. However, all actor variables are added to the ActorContext as attributes, which you can access.

To access ActorContext, request or session attributes, you can map the attribute to a value using the ${order.id} syntax or ${commerceItems[0]} array notation.

For example, you could resolve a Nucleus component using the following EL expression:

${nucleus['/atg/commerce/ShoppingCart'].current}

If a variable name does not start one of the implicit objects listed in the Working with Implicit Objects section, the system will look up the variable in the attributes of the ActorContext, then in the attributes of the request and finally in the attributes of the session. Note that you should have a separate actor context per actor-chain.

When working with a JSP page and JSPActors, the JSP c:set tag saves the variable in a request or session attribute. The attributes that are set using the c:set tag are accessible in the actor definition and can be referenced in an output element to include in the ModelMap.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices