session properties data are shared by multiple pages launched on the same client.
(we can compare in the vision “world” : the tag client for multiple desktop from the same vision client are shared)
Is there a way to have some session data not shared by all pages of the same session ?
My idea was to use session.custom.myprop[pageId]
But I have to bind session custom prop data. Can we make some kind of indirect binding with session custom prop ?
another way could be a settings in the project to force Ignition to create a new session instead of keeping the same session when multiple tab or client broswer are launched on the same machine ?
I don’t know that this is encouraged (we don’t allow
page.custom, for whatever reason) but could you just put your own info into a new page prop?
page.props.$yourObjectName should be fine to write to.
Yes, thanks a lot Paul. That’s exactly what I need. What an hidden gem !
Would be perfect in the future if they are a property editor for a page.custom…and a way to set an initial values for such page properties.
As a workaround, the initial value for “page custom props” can be set in some onStartup event.
Hello, can you further explain what to set to be able to open multiple tabs in browser but each tab has separate session ? Thanks.
Each tab opened in the same browser share the same session and then the same session properties.
If you need some data specific to each tab you need to add them to page.props properties
This kind of property has no editor in the designer but you can create and use them in binding and script…
could you explain more deeply ? So e.g. i have a page and I add custom property here ?
and then when I edit it from one tab it will not be reflected in other tab ?
It’s just a workaround,
In the onStartup script of your view, add someting like:
self.page.props.myProp1 = "myValue"
And you can use the value in a binding