VB Switcher Component

The VB switcher web component that is used to display the content of one of many VB flows in a VB page, and to quickly switch which one is displayed.

An API is provided to select which flow to render and to add or remove flows from an array of available flows.

The following features are supported:

  • the view and viewModel is persisted when switching flows
  • navigation within a switcher element is allowed
  • record the transition in the browser history

DOM and viewModel caching

In order to provide a quick switching between flows, support pages with iframe and to preserve the selection and scrolling position, the content of the flow is preserved when switching to an other flow. This is done by by showing and hiding the DOM nodes. The resources taken by a switcher element are only released when the element is removed from the ArrayDataProvider.

Note:

Memory usage

Be aware that having a large amount of flows open in the switcher can result in a large memory usage in the browser.