Show TOC

ControllerLocate this document in the navigation structure

Use

Handling Controller Methods

A controller contains methods for editing context attribute values and triggering and handling events, as well as containing contexts. For more information, see Programming Manual for Web Dynpro for ABAP .

Alongside these predefined method structures, you can create your own methods and call them from your application. The greater the size of a Web Dynpro application, the more effective it becomes to move its logic into separate auxiliary classes. This makes the methods much more flexible, since you can use these auxiliary classes in other application. Web Dynpro Framework itself implements an assistance class . The inherited type of this class gives it special properties that can be used as appropriate by Web Dynpro Framework. In addition, you can create your own auxiliary classes and structure them to match your application landscape.

Independent auxiliary classes have the additional benefit of optional parameters.

Note

Remember that the methods from auxiliary and assistance classes can be called directly from view controllers as well.

Handling Method Attributes

We also recommend that you create method attributes in separate auxiliary classes, and reference them from the Web Dynpro methods.

Events

Caution

Events and event handling in Web Dynpro for ABAP are not identical to the similar concepts in ABAP.

In particular, events can be caught and handled only if a controller usage is entered for both controllers involved.

Assistance Classes

Assistance classes are instantiated with their component.

Note

In prinicple, assistance classes can also be used outside of their asssociated component. This is particularly useful with reference to model interfaces. See also DEMO_COMMON_ASSISTANCE1 .

If a particular assistance class is accessed from various components in a component chain, it makes sense to create the class in the main component and then pass it to the subcomponents.