VB Switcher Examples
Example 1-65 Switcher elements ADP declaration using JET ojmutablearraydataprovider
"switcherArray": {
"type": "object[]",
"defaultValue": [
{
"flow": "aaa",
"name": "Flow aaa",
"id": "a"
}
]
},
"switcherMutableArrayDP": {
"type": "ojs/ojmutablearraydataprovider",
"constructorParams": [
"{{ $variables.switcherArray }}",
{
"keyAttributes": "id"
}
]
},
Example 1-66 Switcher elements ADP using vb/ArrayDataProvider2
"switcherArray": {
"type": "object[]",
"defaultValue": [
{
"flow": "aaa",
"name": "Flow aaa",
"id": "a"
}
]
},
"switcherADP": {
"type": "vb/ArrayDataProvider2",
"defaultValue" : {
"keyAttributes": "id",
"data": "{{ $variables.switcherArray }}",
"itemType": "object"
}
}
Example 1-67 How to mark a page or a flow to be embeddable
{
"title": "Start Page",
"description": "Landing page of the flow",
...
"navigation": {
"embeddable": "enabled"
}
}
Example 1-68 Usage in page HTML
<oj-vb-switcher
data="[[ $variables.switcherADP ]]"
current-item="{{ $variables.selectedItem }}"
bridge="[[ vbBridge ]]"
on-vb-before-pop-state="[[ $listeners.beforePopstate ]]">
</oj-vb-switcher>
Example 1-69 Entry in imports section of the page definition to load the component
"imports": {
...
"components": {
"oj-vb-switcher": {
"path": "vb/components/oj-vb-switcher/loader"
}
}
}