Show TOC

Controller ContextLocate this document in the navigation structure

Use

Every controller has a Context in which the used data are stored hierarchically. This context is empty when a new component is created.

To create and maintain the context of a controller, choose the Context tab page in the Controller Editor.

On the left side of this tab page you can see the structure of the context that you want to process. To create a structure beneath the empty root node of the selected context, open the context menu for this node.

Note

Using Switch to Context Editor View you can branch to the table view Context Editor that permits context processing in the form of a table and in this way offers the same function as the hierarchical Context Editor.

Create

The Create function enables you to design your context by creating individual context nodes and context attributes.

Note the following rules:

  • For each context you can create either attributes or nodes beneath the root node. Attributes that were created directly below the root node are called free attributes.

  • No mapping can be defined for root node CONTEXT. If you want to define mapping for a context node later, first you have create a new subnode below the root node, since no mapping can be defined for this root node.

    Note

    However, it is possible to map to a root node. This means that you can define mapping for a non-root node to the root node of a different context.

  • No mapping can be defined for individual attributes.

    This is why you have to create a new node first for the attribute(s) that are intended for mapping.

  • All nodes must have a unique name within a context.

    Nodes with the same name are not permitted in different hierarchy levels. Attribute names can be used several times, however, as long as they were not created in the same node.

  • All child elements within a node must have a unique name.

    It is not permitted for a subnode to have the same name as an attribute of the same node.

  • Names of context elements may contain letters and numbers, but no special characters.

Where-Used List

In a view or component controller for context elements you can call up the Where-Used List using the symbol in the menu bar in the Web Dynpro explorer. Select the required context element, and choose CTRL+Shift+F3.

A list of usages in UI bindings, external mappings, and in method source codes is displayed.