# \[BUG-998\] page.props.primaryView

**URL:** <https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [February 25, 2020, 10:17am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575 "2020-02-25T10:17:57Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [February 25, 2020, 10:17am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/1 "2020-02-25T10:17:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 25, 2020, 3:21pm UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/2 "2020-02-25T15:21:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [February 26, 2020, 8:08am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/3 "2020-02-26T08:08:17Z")

</div>

here is a docked view i am using:

```auto
{
  "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:

```auto
{
  "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"
  }
}

```

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 26, 2020, 3:26pm UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/4 "2020-02-26T15:26:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [February 28, 2020, 9:21am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/5 "2020-02-28T09:21:33Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [March 3, 2020, 11:45am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/6 "2020-03-03T11:45:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [October 27, 2020, 4:28pm UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/7 "2020-10-27T16:28:52Z")

</div>

I am seeing the same behavior in 8.0.16

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [December 5, 2020, 11:06pm UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/8 "2020-12-05T23:06:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![indenkleefj](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/indenkleefj/32/10961_2.png) [@indenkleefj](https://forum.inductiveautomation.com/u/indenkleefj)\
**Post date:** [March 15, 2021, 9:24am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/9 "2021-03-15T09:24:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 15, 2021, 3:05pm UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/10 "2021-03-15T15:05:07Z")

</div>

This issue has not been resolved yet. No ETA.

---

<div class="post-metadata">

**Author:** ![jBrekelmans](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@jBrekelmans](https://forum.inductiveautomation.com/u/jBrekelmans)\
**Post date:** [April 21, 2021, 10:23am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/11 "2021-04-21T10:23:08Z")

</div>

Same problem over here ☹

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [May 27, 2021, 12:12pm UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/12 "2021-05-27T12:12:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![indenkleefj](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/indenkleefj/32/10961_2.png) [@indenkleefj](https://forum.inductiveautomation.com/u/indenkleefj)\
**Post date:** [July 22, 2021, 6:52am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/13 "2021-07-22T06:52:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![321liftoff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/321liftoff/32/27544_2.png) [@321liftoff](https://forum.inductiveautomation.com/u/321liftoff)\
**Post date:** [August 25, 2021, 2:59am UTC](https://forum.inductiveautomation.com/t/bug-998-page-props-primaryview/32575/14 "2021-08-25T02:59:58Z")

</div>

Not sure if this was released, but I’ve found that using the Navigation Action within the OnClick event has reliable results over using system.perspective.navigate()

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/4/d4187296017d571eb34c1c04057dd724b131d1a6.png)
