Show TOC Start of Content Area

Procedure documentation Creating the Context  Locate the document in its SAP Library structure

In the procedure below, you first add the newly created model to the list of used models of your Web Dynpro application. Then you will create the necessary context structure.

Procedure

Adding a Model to the Web Dynpro Component

..

       1.      Expand the project structure ComponentsStudsWDCompUsed Models.

       2.      In the context menu of the Used Models node, choose Add and select the Model you have created in the last step.

       3.      Confirm with OK.

Binding the Component Controller Context to the EJB Model

       4.      Select your component StudsWDComp in the Web Dynpro Explorer and choose Open Component Modeler from the context menu.

       5.      Select Create Data Link and draw an arrow from the Component controller to the Model as shown in the screenshot below. The Edit Model Binding wizard opens.

This graphic is explained in the accompanying text

       6.      Choose Request_StudsLocal_getStudent model class, in the following screen select all and choose Finish.

The Requestmodel class should be mandatory for the context. This forces the Web Dynpro context to implicitly create its instance (with all of its mandatory relations in depth).

This graphic is explained in the accompanying text

       7.      Navigate to Properties tab of the Request_StudsLocal_getStudent context node and change the Collection Cardinality property to 1..1.

This graphic is explained in the accompanying text This graphic is explained in the accompanying text

Mapping the Controllers

       8.      Select Create Data Link again and draw an arrow from the View Controller StudsWDCompView to the Component Controller.

       9.      Choose the Request_StudsLocal_getStudent node and map it to the Root node of the view context StudsWDCompView. Confirm with Finish.

Result

You have created the necessary view context structure and also bound the context nodes to the corresponding model classes.

This graphic is explained in the accompanying text

End of Content Area