here is a docked view i am using:
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"height": 90,
"width": 1280
}
},
"root": {
"children": [
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.navigate(\"/\")\n"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button Home"
},
"position": {
"basis": "100px"
},
"props": {
"image": {
"height": 30,
"icon": {
"library": "material",
"name": "home"
},
"width": 30
},
"style": {
"backgroundColor": "#FFFFFF00"
},
"text": ""
},
"type": "ia.input.button"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.refreshBinding(\"session.props.theme\")\n"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Label Header"
},
"position": {
"basis": "20px",
"grow": 1
},
"propConfig": {
"props.style.classes": {
"binding": {
"config": {
"expression": "{session.custom.Styles.LabelStyle.Footer}"
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"path": "page.props.primaryView"
},
"type": "property"
}
}
},
"props": {
"alignVertical": "center",
"style": {}
},
"scripts": {
"customMethods": [],
"messageHandlers": [
{
"messageType": "Refresh",
"pageScope": true,
"script": "\t# implement your handler here\n\tself.refreshBinding(\"props.text\")",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tif self.session.props.theme \u003d\u003d \"light\":\n\t\tself.session.props.theme \u003d \"dark\"\n\telse:\n\t\tself.session.props.theme \u003d \"light\" \t "
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button ChangeTheme"
},
"position": {
"basis": "100px"
},
"props": {
"image": {
"height": 30,
"icon": {
"library": "material",
"name": "wb_sunny"
},
"width": 30
},
"style": {
"backgroundColor": "#FFFFFF00"
},
"text": ""
},
"type": "ia.input.button"
}
],
"meta": {
"name": "root"
},
"propConfig": {
"props.style.classes": {
"binding": {
"config": {
"expression": "{session.custom.Styles.Background}"
},
"type": "expr"
}
}
},
"props": {
"style": {
"overflow": "hidden"
}
},
"type": "ia.container.flex"
}
}
another one i am using the same thing here:
{
"custom": {},
"params": {},
"props": {
"defaultSize": {
"width": 250
}
},
"root": {
"children": [
{
"meta": {
"name": "FlexRepeater"
},
"position": {
"basis": "320px",
"grow": 1
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"parameters": {
"PageName": "{page.props.primaryView}"
},
"queryPath": "GetMenuItems",
"returnFormat": "json"
},
"type": "query"
}
}
},
"props": {
"direction": "column",
"path": "Templates/NavButton",
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
}
],
"meta": {
"name": "root"
},
"propConfig": {
"custom.PrimaryView": {
"binding": {
"config": {
"path": "page.props.primaryView"
},
"type": "property"
},
"onChange": {
"enabled": null,
"script": "\tself.session.custom.HeaderTitle \u003d currentValue.value\n\tsystem.perspective.sendMessage(\"Refresh\")\n"
}
},
"props.style.classes": {
"binding": {
"config": {
"path": "session.custom.Styles.Background"
},
"type": "property"
}
}
},
"props": {
"direction": "column",
"style": {
"paddingBottom": "5px",
"paddingLeft": "5px",
"paddingRight": "5px",
"paddingTop": "5px"
}
},
"type": "ia.container.flex"
}
}