Show TOC Start of Content Area

Background documentation View Navigation Plugs and Navigation Links  Locate the document in its SAP Library structure

Usually, several views are embedded in a Web Dynpro window.Therefore, it is necessary to qualify one view as the view that is displayed first of all when a window is called. This view is assigned the default property. The subsequent navigation structure is then created using this view.

If you wish one view to be removed from the current view assembly, and replaced by another view, then you must define navigation plugs in each view and connect them together with a navigation link. Navigation plugs are view specific and come in two varieties: inbound plugs and outbound plugs.

This graphic is explained in the accompanying text

View Outbound Plugs

When an outbound plug is fired, a Request for Navigation message is sent to the Web Dynpro framework. The Web Dynpro framework takes this request and places it in a stack that will only be processed after all the views in the current view assembly have responded to user events.

View Inbound Plugs

An inbound plug is a method in the target view that is able to respond to the outbound plug’s Request for Navigation. Once all the views in the current view assembly have finished their processing, the Web Dynpro Framework turns its attention to the requests on the navigation stack.

Note

Within the scope of a window, any view having its default parameter set to true, does not need to be called using a developer defined inbound plug in order for it to be seen when the screen is first rendered.

The entering of a view using an inbound plug always causes an event handler method to be called. This is why an event handler method (whose use is optional) is automatically generated for every inbound plug. In this case, the inbound plug itself represents the event to be handled.

More information: Events and Actions

Navigation Links

To navigate from one view to another, each outbound plug must be associated with an inbound plug in the target view. This association is known as a navigation link, and can only be defined at design time. You are not restricted to having a one-to-one relationship between outbound and inbound plugs. It is possible to have one outbound plug associated with many inbound plugs. Similarly, it is possible to have many outbound plugs associated with one inbound plug.

Caution

If you fail to create a navigation link between an outbound and an inbound plug, then firing such an outbound plug will cause a fatal error in the Web Dynpro framework.

Normally, most steps performed at design time can also be performed at runtime through the Web Dynpro framework API. However, the association of an inbound plug with an outbound plug is one of the few exceptions to this rule.

Once this design time association has been made, the developer should implement the coding in the action event handler method that decides whether navigation is to take place or not. E.g. only perform navigation if all the data received from the user are valid.

Since a design time association has already been made between an outbound plug and one or more inbound plugs, it is sufficient for the developer simply to call the method generated by the declaration of the outbound plug. The Web Dynpro framework then automatically handles the execution of the corresponding inbound plugs in the target views.

Navigation Stack

By declaring a navigation link, you create a fixed association between two views in a window. Once you fire the outbound plug, the Request for Navigation is unconditionally placed on the navigation stack. After this point in time, only the following options are available to you concerning navigation processing:

      Process all the requests in the navigation stack

      Abort the processing of the entire navigation stack

There is no possibility to selectively process navigation requests once they have been added to the navigation stack. You either process the whole stack, or you abort the navigation processing entirely. Therefore, when writing navigation coding, care should be exercised before deciding to fire an outbound plug.

End of Content Area