Start of Content Area

Component documentationController/Context Editor  Locate the document in its SAP Library structure

The Controller/Context Editor provides graphical support for the creation of controller context trees and the subsequent definition of the data flow between two Web Dynpro entities. The Controller/Context Editor is used for creating the context structures of all controller types.

The Editor supports the following tasks:

·        Creating a structure for the automatically generated context of a controller. This is a tree structure with nodes and attributes. The structure elements can be model nodes and model attributes or value nodes and value attributes.

·        Defining the data flow between the model, the view contexts, and the controller contexts. In the data transfer between the view context and the controller context, data binding takes place – that is, a reference is passed. The same applies to the data flow definition between the Web Dynpro model and the controller of an application. However, if data is passed between the controllers of an application, these are data copies (mapping).

The Controller/Context Editor is made up of two parts: The first is an editable area with This graphic is explained in the accompanying textContext as the main node; this is the starting point for the definition of the context structure with the nodes and attributes. You use the This graphic is explained in the accompanying textContext node to create, display and delete nodes. The second editor area initially displays the elements of the Web Dynpro application that are referenced by the Web Dynpro component. Which elements are displayed depends on the Web Dynpro application entity that is currently being edited in the Controller/Context Editor. When you edit a custom controller, the models and controllers referenced by the Web Dynpro component are displayed in the area on the right. From these referenced entities, you select the one which, as a source element, will be available for the current data flow definition by choosing a corresponding button. In this second area of the Controller/Context Editor, the selection of the data source is followed by the display of the structures and data of the source element – that is, the model or the controller. If you use the Controller/Context Editor to edit a view context, the controllers referenced by the component are displayed as possible data sources in the area on the right.

A dialog box is also available that provides graphical support when defining the mapping, data binding, or model binding. In the source structure, you can select the data to be transferred; you can even select entire structures.

Opening the Controller/Context Editor

You start the Editor from the Web Dynpro entity for which you want to define a context tree. This can be a Web Dynpro component, a controller, or a view. In the Web Dynpro Explorer, choose the context menu entry Edit. In the right screen area, the Controller/Context Editor is started in the Context tab.

Additional Information

The procedure for referencing the various Web Dynpro entities in preparation for the data flow definition is described in the following sections:

Referencing a Custom Controller

Referencing a Model

Referencing a Component

For information on creating a tree hierarchy with nodes and attributes for the context definition, refer to Context Structure.

 

End of Content Area