Hey AppBuilders!
I configured a graphVisualizer with a few Nodes and Edges - so far so good.
But now I need to configure on the nodes the “onClick” behavior with a redirect to another App-Page and passing variables to that page.
I tried it without the variables and it worked, but the variables (even with hard coded values) won’t get transferred.
I tried also the redirect, but I didn’t get it working with the example in the documentation.
Do you maybe got some code-snippet here for me, which would work?
Here is my code-snippet for the onClick with the nodes:
"nodeConfig": [
{
"nodeTemplate": "node-grid",
"nodeTemplateConfig": {
"backgroundColor": "#DEDFE0",
"cells": [
{
"config": {
"backgroundColor": "#DEDFE0",
"column": 1,
"fontSize": "20",
"margin": 8,
"row": 1,
"stretch": "Fill",
"text": "$header",
"textAlign": "left",
"verticalAlignBox": "center",
"behaviour": {
"onClick": {
// "redirects": {
// "key": "state",
// "value": {
// "page": "kritischeKundenauftraegeDetail_pg",
// "variables": {
// "endgeraet_nr": "9294305544",
// "kundenauftrag_posnr_var": "2164001-10"
// }
// },
// "encoding": "lzString"
// }
"moveToAppPage": {
"targetPage": "kritischeKundenauftraegeDetail_pg",
"variables": {
"endgeraet_nr": "9294305544",
"kundenauftrag_posnr_var": "2164001-10"
}
}
}
}
},
"type": "text"
},
{
"config": {
"backgroundColor": "#DEDFE0",
"column": 1,
"margin": 8,
"row": 2,
"text": "$body",
"textAlign": "left"
},
"type": "text"
}
],
"fromSpot": "Bottom",
"toSpot": "Top"
},
"nodeType": ""
}
],