VB Switcher Usage and Properties

The VB switcher is a web component that can only be used in a Visual Builder page. Usage consists of specifying an array of switcher elements, and which one is current.

Limitations

  • Only one switcher component can be present in a page.
  • When the switcher component is present in a page, no other flow can be displayed in that page (no oj-vb-content component).
  • Only flows marked with the embeddable = "enabled" property, or flows where the default page is marked with the embeddable property, can be embedded in a switcher.

Properties

Name (Type) Description
data (ArrayDataProvider)

An ArrayDataProvider, where each element of the element array is a switcher element. For adding elements dynamically, it should be an ArrayDataProvider that supports mutation, like the JET MutableArrayDataProvider or the VB ArrayDataProvider2. Either flow or application property is required for the element to be valid.

data.id (String)

The id of the switcher element (required)

data.application (String)

The id of the App UI. (optional, if not specified, the flow property is used with the current App UI)

data.flow (String)

The id of the flow

data.page (String)

The id of the page of the flow to display if different than the default page (optional)

data.params (String)

An object, where the properties are page or flow input variable names (optional)

currentItem

The id of the flow element to display. If the value is null, no switcher element is displayed. The value can be set to change which switcher element is displayed. If the id does not match an element of the data array, an error is thrown.

bridge (Object)

A reference to the internal property vbBridge, which is already available in the VB page model. The value is always "[[vbBridge]]"