Professional Documents
Culture Documents
03 0 Context at Design Time
03 0 Context at Design Time
03 0 Context at Design Time
Contents:
The structure of the context
Context mapping
Internal mapping
Controller Other WD
Required
Controllers Controllers
Implementation
Controller Custom
Context Standard Controller
Interface
Hook
Root Node
Methods
Instance Business
Methods Logic
(Models)
Component Other WD
Usage Components
Created by explicit declaration or coding Created by the Web Dynpro Framework (WDF)
Node
Attribute
Context Node:
Are arranged hierarchically and are permitted to have children
Children of a node may be entities known as other nodes or attributes
Metadata description declared manually or derived from a Dictionary Structure
Context Attribute:
Stores runtime data or references to runtime data
Based on DDIC Types
Context Metadata
Node Metadata (c=cardinality, s=singleton)
Context Root (c=1..1, s=true) IF_WD_CONTEXT_NODE_INFO (interface)
FLIGHTS (c=0..n, s=true) Attribute Metadata (data type)
BOOKINGS (c=0..n, s=false) WDR_CONTEXT_ATTRIBUTE_INFO (structure)
BOOKID A node collection
CUSTOMID
CLASS
All context nodes are collections.
PASSNAME
A node collection is composed of
CARRID
elements, where an element is an
CONNID
aggregation of the node’s immediate
FLDATE children (attributes and/or other nodes).
PRICE The cardinality property controls the
number of elements a node collection
may hold at runtime.
Design time
SAP AG 2005, Title of Presentation / Speaker Name / 6
Context Structure – Runtime (1)
c=1..1, s=true
= Element created by an application at runtime
Default 1 = Element created by the WDF at context initialisation time
Element
c=1..1, s=true
Node collection contains a default element.
Default 1
Element Can contain a maximum of one element.
Independent Node
c=1..1, s=true
= Element created by an application at runtime
Default 1 = Element created by the WDF at context initialisation time
Element = Element at the lead selection
c=1..n, s=true
Node collection contains a default element.
..n Can contain as many elements as required.
2
c=0..n, s=true Default 1
Element
..n
2
1 Independent Node
Node collection is initially empty.
Can contain as many elements as required.
Independent Node
SAP AG 2005, Title of Presentation / Speaker Name / 8
Context Structure – Runtime (3)
Context Root
The runtime structure of the
Default
Context Metadata Element 0
context if node BOOKINGS is a
non-singleton.
Context Root (c=1..1, s=true)
FLIGHTS (c=0..n, s=true) FLIGHTS
BOOKINGS (c=0..n, s=false) CARRID ..n
CARRID
CONNID
2
BOOKID
CARRID
CONNID 1
CUSTOMID
CONNID
CLASS FLDATE
PASSNAME
BOOKINGS
CARRID
BOOKINGS BOOKID ..n
CONNID BOOKID 2
BOOKINGS CUSTOMID
BOOKID ..n
FLDATE BOOKID
BOOKID 2CUSTOMID
1
BOOKID ..nCUSTOMID
PRICE BOOKID BOOKID
2 1CUSTOMID
CUSTOMID
CUSTOMID
BOOKID 1 CUSTOMID
CUSTOMID
CUSTOMID
CARRID
CONNID
BOOKINGS
FLDATE
BOOKID ..n
PRICE BOOKID 2
CUSTOMID
BOOKID
CUSTOMID
1
CUSTOMID
BOOKINGS
BOOKID ..n Supply function
BOOKID
CUSTOMID
2
BOOKI
CUSTOMID
BOOKINGS_READ
1
D
CUSTOMID
Advantages:
CLASS CLASS
PASSN PASSN
CARRID CARRID
CONNID CONNID
FLDATE FLDATE
PRICE PRICE