
Component Controller
The component controller provides data and processing logic that it should be possible to display or change for all views of a component. It has three interfaces:
Within the component, mapping is possible to any context element of the component controller. (See also Data Binding and Mapping ).
The attributes of a component controller are known to all methods that are called within a component and can be used by them, provided they have the Public property. Otherwise, their visibility is restricted to the component controller. Events and methods assigned to the component controller are visible throughout the component. So, for example, any action of a view of the component can call such a method of the component controller.
The visibility of a specially marked number of methods, events and context nodes of a component controller can be extended beyond the borders of one's own component. They then form the interface controller of the component.
Interface Controller
The interface controller is used for cross-component communication. It defines the controller part of the interface of a Web Dynpro component . The interface controller itself does not contain any implementation.
For every interface controller there is a related ABAP interface IWCI_<component_name> or IWCI_<Comp.Interf.Def-Name>. For information on how to use component interface definitions in programming, see Working with Component Interface Definitions .
Interface Controller of a Component
Events, methods and context nodes of the component controller can be made visible for other components; mark the Interface checkbox to assign them to the component interface. They are then included into the related ABAP interface IWCI_<component_name>.
For elements of the context of a controller from another component a mapping can be defined to the elements of the component controller context assigned to the component interface.
In the object list of the ABAP Workbench, the interface controller is displayed as a separate object of the related Web Dynpro component. In spite of this fact, the interface controller of a component is implemented and edited as part of the component controller (see above).
Interface Controller of a Component Interface
Only if an interface controller is part of a component interface , the controller editor is in change mode and the context, the events and the methods can be implemented and edited directly.
The global interface IWCI_<Comp.Interface-Name > is stored in the class library and can be displayed using SE24.
Custom Controller
The properties and use of the custom controller that can be added optionally correspond exactly to those of the component controller. This means that it is visible to all elements of the component and the lifetime of the elements is the lifetime of the component. The custom controller gives you the option of structuring functions and data within a component. It makes sense to create and maintain a custom controller if a certain subset of views of a component should be equipped with a special function or with a special set of data.
View Controller
Just like the component controller, the view controller contains data and functions. Furthermore, the view controller also has
The lifetime of the controller element of a view is restricted to the lifetime of the view. To create simple Web Dynpro applications, it is sufficient if you maintain the component controller and the view controller of a view. The two controllers described below are optional and help you to structure complicated components and applications, thereby increasing their reusability.
Window Controller
For every window created in a Web Dynpro component, a window controller is generated. Such a window controller is visible throughout the component - it behaves like a component or custom controller.