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 context of the view by means of binding the view controller context to the corresponding model structure.
The following procedure does not reflect the recommended way of mapping between view and the model. It is technically possible for a view context to access the model, but this would not be good design style. To use the MVC paradigms in a consistent manner, you require the component controller (or a custom controller) as a binding link between the view and the model. This means, you should better implement most application code in the component controller. The view controller then just delegates to the component controller. Therefore, it is recommended to perform a binding from the component controller context to the EJB Model. In the second step, the view context is mapped to the component context.
The following procedure is aimed to keep the description short!
..
1. Expand the project structure Components → StudsWDComp → Used 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.
4. Select the view node in the project structure via Components → StudsWDComp → Views → <view node> and choose Open → View Editor in the context menu.
5. Select the Context tab.
6. Select the root node of the context and choose New → Node → Model Binding in the context menu. Choose Next.
7. Choose Request_StudsLocal_getStudent model class. Choose Next.
8. 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).
9. Navigate to Properties page of the Request_StudsLocal_getStudent context node and change the value of the property Collection Cardinality to 1..1.
You have created the necessary view context structure and also bound the context nodes to the corresponding model classes. You are now in a position to bind UI elements such as input fields to the corresponding view context elements.