Show TOC

 IF_WD_NAVIGATION_SERVICES_NEWLocate this document in the navigation structure

Interface IF_WD_NAVIGATION_SERVICES_NEW allows you to create the metadata required for dynamic navigation. This makes a declaration of navigations links at design time unnecessary. However, this should only be done if a static declaration of the navigation links is not possible. This may be the case if, for example, it only becomes known at runtime (possibly as a result of how the Web Dynpro component has been configured) which views or interfaces from embedded components are to be displayed.

Use

Interface IF_WD_NAVIGATION_SERVICES_NEW can be accessed from a view in a Web Dynpro component as follows:

data:
l_view_api                type ref to
 if_wd_view_controller,
l_navigation_services_new type ref to
 if_wd_navigation_services_new.
l_view_api = wd_this->wd_get_api(
 ).
L_navigation_services_new ?= l_api.
Methods

PREPARE_DYNAMIC_NAVIGATION

This method creates a navigation link and a navigation target for the specified parameters. All the necessary view embeddings and view container assignments are created at the same time. If the target view comes from an embedded component, if necessary, the component usage is created. After this method has been called navigation can be performed by activating the outbound plug specified in SOURCE_PLUG_NAME.

Calling this method also causes an object of type IF_WD_REPOSITORY_HANDLE to be created, which is returned to the caller. This object allows access to the metadata dynamically created when the method was called.

Note

Repeated calls to this method using the same outbound plug (SOURCE_PLUG_NAME) results in multiple navigation links being created to this outbound plug. As all these navigation links are followed during the navigation phase, this might cause a view other than the anticipated view to be displayed.

The following import parameters exist:

  • SOURCE_WINDOW_NAME

    Name of the window in which the navigation is performed This is the window, in which the start and target views are embedded.

  • SOURCE_VUSAGE_NAME

    Name of the view usage for the start view (see window editor)

  • SOURCE_PLUG_NAME

    Name of the outbound plug

  • TARGET_COMPONENT_NAME

    Name of the target component, that is the view to be displayed in the internal window.

  • TARGET_VIEW_NAME

    Name of the target view to be navigated to

  • TARGET_PLUG_NAME

    Name of the inbound plug

  • TARGET_EMBEDDING_POSITION

    Embedding position of the view in the format:

    [<View1>/ <Container1>.[<View2>/<Container2>]*].

    If this parameter is set to initial, the view to be navigated to will be directly embedded in the window.

The following return parameters exist:

  • REPOSITORY_HANDLE (reference to IF_WD_REPOSITORY_HANDLE)

    Handle in which the generated meta data can be accessed.

DO_DYNAMIC_NAVIGATION

Dynamic navigation is performed. To do this, the navigation link, navigation target, outbound plug, component usage, view embeddings, and view container components are created - provided that they do not already exist - for the navigation target. The navigation is then performed.

Calling this method also causes an object of type IF_WD_REPOSITORY_HANDLE to be created, which is returned to the caller. This object allows access to the metadata dynamically created when the method was called.

Note

Repeated calls to this method using the same outbound plug (SOURCE_PLUG_NAME) results in multiple navigation links being created to this outbound plug. As all these navigation links are followed during the navigation phase, this might cause a view other than the anticipated view to be displayed.

The following import parameters exist:

  • SOURCE_WINDOW_NAME

    Name of the window in which the navigation is performed This is the window, in which the start and target views are embedded.

  • SOURCE_VUSAGE_NAME

    Name of the start view embedding

  • SOURCE_PLUG_NAME

    Name of the outbound plug

  • PLUG_PARAMETERS

    List of parameter values in the outbound plug

  • TARGET_COMPONENT_NAME

    Name of the target component, that is the view to be displayed in the internal window.

  • TARGET_VIEW_NAME

    Name of the target view to be navigated to

  • TARGET_PLUG_NAME

    Name of the inbound plug

  • TARGET_EMBEDDING_POSITION

    Embedding position of the view in the format:

    [<View1>/ <Container1>.[<View2>/<Container2>]*].

    If this parameter is set to initial, the view to be navigated to will be directly embedded in the window.

The following return parameters exist:

  • REPOSITORY_HANDLE (reference to IF_WD_REPOSITORY_HANDLE)

    Handle in which the generated meta data can be accessed.