Start of Content Area

Component documentation Controller and Context  Locate the document in its SAP Library structure

Controller

The controller is responsible for programm control, determining the data flow between the view and the model and handling events.

There are different types of controllers:

·        A view controller is directly assigned to a view. 

·        The component controller is the central instance to which you can add other custom controllers. These controllers interact with the model.

·        An interface controller makes its data available to a higher-level component.

Context

A controller contains a context which holds the data. The data flow between the contexts is referred to as context mapping.

The component controller context or the context of another custom controller holds and manages the data whereas a view controller context simply holds the data required for the respective view. These contexts are mapped to the context of the customer controller. This means that they are not held but only referenced in the view controller context. 

 

The Web Dynpro tool Controller/Context Editor provides support for the creation of a context structure through the definition of nodes and attributes.

 

End of Content Area