Show TOC

NavigationLocate this document in the navigation structure

Use

There are two options for navigating to a different URL:

  • navigation->goto_page for a page or a controller

  • <bsp:goto> element for a controller

navigation->goto_page

navigation->goto_page

With goto_page, there is a Redirect to the specified page (or to the controller), that is, the browser is informed that it may request a different page. There is then a new browser request to the destination page.

This has the following effects:

  • The browser recognizes the URL for the destination page, since it requested it itself. In the page does not run in a frame, its URL is displayed in the address line of the browser.

  • An additional browser request is required, which leads to increased network load. Even if the amount of data is extremely small, this may slow down performance with very slow networks (such as via satellite).

  • In a stateless case, all temporary data from previous processing is lost.

<bsp:goto> Element

<bsp:goto> Element

With the <bsp:goto> element, the new controller or view is called to provide the content for the current request.

This has the following consequences:

  • The browser does not recognize the URL for the destination page, but tries to communicate with the existing page.

  • No additional browser request is required.

  • If no target has been entered in the form of the target page, the request that results from sending the form (or also from a refresh) is sent to the requesting page. As a result, the target page only has the task of creating the HTML (view) and does not usually have to worry about input. The calling page is responsible for this and thereby takes over the controller functionality.

  • The work process does not change, that is, the context remains the same even in a stateless application and you can therefore access the data and objects that have already been created.

  • The controller must be able to use the input to decide on its current "status" if it should display several views after each other. It should not store this status on the server, otherwise the "Back" processing would not function correctly. With different URLs, this is easier using redirects.

  • When you use different views, the URL does not change. As a result, you cannot use bookmarks on these pages.

What does page_name point to?

What does page_name point to?

runtime->page_name always points to the externally addressed page or the controller. You get the name and URL using page->get_page_name() or page->get_page_url().

Lifetime of the view that is called

The lifetime of the view that is called is limited to the call only. For more information, see Lifetime and SAP Note 545847.