Start of Content Area

Process documentation Nesting Components  Locate the document in its SAP Library structure

You have the option of nesting Web Dynpro components (from now on referred to as components). One component is “embedded” in another. Nesting components offers the following advantages:

·        The Web Dynpro application is divided into interacting entities

·        The layout of a large Web Dynpro application is clearer

·        Working with reusable entities saves costs and development resources

Neither at design time nor at runtime does the embedding (outer) component have any knowledge of the structure of the embedded (inner) component. However, it does know the interfaces of the inner component at runtime - that is, the interface controller and interface views.

This graphic is explained in the accompanying text

Interaction Between Nested Components

The interaction between nested components is implemented via method calls that originate from the outer component. The component interface starts these method calls. When nesting components, this interface function is obligatory and must be implemented in the program logic. However, an optional visual interface is also available.

The Programmatic Interface

The programmatic interface is used to trigger the method calls from the outer component. The outer component gains access to the context of the interface controller and can then react to events. This definition is carried out declaratively using the Web Dynpro tools. The programmatic interface itself consists if the interface controller.

The Visual Interface

Using the visual interface is optional. It allows you to embed a component window as a view of the outer component. This is achieved by a 1:1 association with the interface view in the component interface.

You define event handlers in the outer component and then register them for events in the interface controller of the inner component. The inner component can use an inbound plug to navigate to the interface view of the outer component and can also trigger an assigned event handler. The inner component can thus interact with the outer component by raising events that are handled by the outer component.

 

See also:

Embedding Components

Specifying the Call Sequence of Components

 

End of Content Area