VB Switcher Methods

closeItem

Dispatch the vbBeforeExit event to all the containers of a switcher element the same way it is displayed when navigating. Returns a promise with the result of the event. This allows a page to veto the closing of a switcher element, for example, when dirty data is detected.

Name (Type) Description
id (String)

The item to close.

<return> (Promise)

A Promise that resolves to a boolean. If the result is false, the application should not remove switcher element from the array. It is recommended to invoke this function in the listener of the ojBeforeRemove event of the tabBar component so that the array of switcher elements is not affected.

navigate

Navigate the content of the current switcher element from a page containing the switcher component.

The parameters and the return value are the same as the navigate action.

Name (Type) Description
options (Object)

The navigate options is an object with the same properties as the navigate action.

options.page (String)

The path to the destination page. The path can be absolute, starting at the application, or it can be relative to the current page. When used in combination with a flow or application, the path cannot be absolute, and it navigates to the page relative to the flow or App UI.

options.flow (String)

The id of the destination flow. Change the content of the flow displayed in the current page. When used in combination with a page, navigates to the page in that flow.

options.application (String)

The id of the destination App UI. Change which App UI is displayed in the host application. When used in combination with a page and flow, navigates to the page in that App UI.

options.target (String)

The target of the destination flow. The valid values are "parent" or "self" (default). This is used in combination with a flow to change the content of the parent flow instead of the nested flow.

options.history (String)

Defines the effect of the navigation on the browser history. The allowed values are "replace", "skip" and "push" (default). If the value is "replace", the current browser history entry is replaced, meaning that the browser's Back button will not go back to it. If the value is "skip", the URL is left unchanged.

options.params (String)

A key/value pair map that will be used to pass input parameters to a page (optional).

<return> (Promise)

A Promise that resolves to an object with the boolean property navigated, indicating if the navigation succeeded.