Thursday, June 12, 2008

Web Dynpro Component Context

Definition

The data used in the component or in the view is stored in the context. Read-write access to this data is available using the controllers as a starting point.

Structure

The data from the contexts is managed in a hierarchical structure. Each context has a root node, underneath which the individual data fields (attributes) are stored in a tree structure. You create this tree structure according to the structure of your application.

This graphic is explained in the accompanying text

Each node contains data fields that represent one of the following:

  • An individual instance of an object type
  • A table of instances.

darstellen. This property of a node is known as its cardinality. The following table summarizes the possible cardinalities for a node:

Cardinality

Meaning

1:1

The node contains only one element instance; this instance is instantiated automatically.

0:1

The node contains only one element instance; this instance must not be instantiated.

1:n

The node can contain multiple element instances of which at least one must always be instantiated (and is instantiated automatically).

0:n

The node can contain multiple element instances of which none have to be instantiated.

For more information on this property and other properties of context nodes, see Context Nodes Properties.

Recursion Nodes

Dynamic node nesting is possible within a context, creating what is called a recursion node. The node that is used for recursion is always a predecessor of the new node. The newly created recursion node is a reference to a predecessor node and therefore cannot be processed separately. Instead it takes on the structure of the node to be repeated.

This graphic is explained in the accompanying text


The root node of a context cannot be used for a recursion.

No comments:

Archive