Entering content frame

Process documentation Developing the Internal Web Dynpro Component Locate the document in its SAP Library structure

Purpose

The objective of the Eventing example application is for the inner Web Dynpro component to define and subscribe an event that passes data to the embedding Web Dynpro component.

Within Web Dynpro components, events can be defined for all controllers except view controller, interface view controller, and configuration controller. This is due to the fact that, according to the Web Dynpro programming model, the non-view controllers do not know the existing view controllers and, therefore, cannot subscribe to the events of the view controllers. Events may contain parameters.

In our example, we define in the component interface controller (controller representation of the Web Dynpro component for outer users) an event called InnerEvent with a parameter of type string. When the controller of the view form uses this component interface controller, in an event handler of the view controller, a public method of the component interface controller can trigger the InnerEvent.

The ControlPanel view controller of the embedding Web Dynpro component Embedder can then subscribe to this event of the embedded Web Dynpro component defined in the component interface controller.

In the Form view, a simple form is designed, used to enter the event parameter value and to trigger the event.

Process Flow

The next sections are structured as follows:

...

       1.      Declarations in the component interface controller of the Internal Web Dynpro component:

                            a.      Event definition

                            b.      Method definition

       2.      Declarations in the Form view controller:

                            a.      Action

                            b.      View context

                            c.      Usage of the component interface controller of the Internal Web Dynpro component

       3.      Design of the view layout of the Form view

       4.      Implementation:

                            a.      Event handler in the Form view controller

                            b.      Public method in the component interface controller for triggering the event

This graphic is explained in the accompanying text Now continue with Declaring Event and Method in the Component Interface Controller.

 

Leaving content frame