SAP TECHED ’05
S
EPTEMBER
20052
Exercise 1 – Embedding a User Interface Component
This first exercise dealing with Web Dynpro Componentization is based on an incomplete Web Dynpro DC template. After havingfinished this exercise the following learning objectives will be fulfilled:
Defining a component usage relation with lifecycle
manual
.
Visually embedding a component interface view inside a
ViewContainerUIElement
.
Programmatically creating a component instance for a defined component usage.
Completing a context mapping chain based on external context mapping.
Estimated time required for completion: 20 min
Opening the local exercise Web Dynpro DC
1.
In the Web Dynpro Explorer select the local Web Dynpro DC with name
LocalDevelopment~cd355~comp~simple~main~sap.com
2.
Select the Web Dynpro component with name
MasterComp
.
STEP 1 - Declaring a component usage relation (using the OrdersUIComp)
Figure 1
1.
Select the node
Web Dynpro
Web Dynpro components
MasterComp.
2.
Double-click this node for opening the data modeler.Alternatively you can select the context menu item
Open Data Modeler.
3.
In the left toolbar select the icon
Embed an existingcomponent.
Afterwards this icon is marked grey.4.
Move the mouse cursor above the area
Used Web Dynprocomponents
and click the mouse button (see figure 1).5.
The
New component usage window
appears (see figure 2).Inside the popup window define the following properties:a.
Name
:
OrdersUIComponent
b.
Used Web Dynpro Component
(choose
Browse …
):
OrdersUIComp
c.
Lifecycle
:
manual
(do not select the default value
createOnDemand
!)
Figure 2