[BUG-998] page.props.primaryView

I use page.props.primaryView as binding to a label in a docked window (header).
However it is not always updating as expected.

One of the following 3 things happens:
1: it is updating
2: it is updating but with a big unexpected delay
3: it is not updating at all

Mostly of the times it is not updating at all.
However It is updating correctly when I configure a onclick method at de label with (only when I click with the mouse ofcourse):

self.refreshBinding(“session.props.theme”)

How is the theme even related to page.props.primaryView?
And why is the page.props.primaryView not updating at all?

Im using Ignition 8.0.8

I’m not able to replicate this issue, but I could look into it a bit further if you’d be able to provide me the Docked View you are using.

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"
  }
}

I was not able to replicate the issue with the Views you provided. The second View was not a good View to attempt to replicate an issue with as it’s dependent on a query I obviously do not have. I replaced the query with one from my own environment, but without knowing what that query returns (content and size) I can only assume that my working query is close enough.

As for why the click event “fixes” your issue: It shouldn’t - you’re not even using the function correctly, and an examination of your Gateway logs will show you that clicking that Label is resulting in a script error being logged to the Gateway.

I see i made an error in the message handler indeed.

However the headertext is still taking a long time to update or not updating at all.
It is just a binding to page.props.primaryView
The strange thing is when I click a button (even without any function on it) the text will update, no matter if the button is on another docked window or just on the view or header itself.

I expect it to update immediatly because it is a property binding.

I will test it on another server within a few weeks (maybe the slow updates may be faster then).

In another project it works as it should be.
I will test it again with the project where it does not work on another server soon to see if that’s the problem

I am seeing the same behavior in 8.0.16

For anyone landing on this thread, this bug has been confirmed by support. No word yet on when a fix will be available.

I just upgraded to version 8.1.3 and still have the same problem.
Did anyone hear an update on this ticket?

This issue has not been resolved yet. No ETA.

Same problem over here :frowning:

i got it for page.props.path but i assume this is the same bugg

I got a ticket update from IA support: The development team has provided a bug fix for the issue you saw in ticket where the Perspective page.props.path and page.props.primaryView properties can be incorrect during navigation. The fix for this issue will be in Ignition 8.1.8 and has been added to the 8.1.9 nightly build. The bug fix will released in the 8.1.8 stable release. As a disclaimer to keep in mind, this bug fix isn’t included in the current Ignition 8.1.8 RC version, which is 8.1.8rc1.