Hi all,
I have a simple project, and want to do some session property testing. So, from the IA docs video, I did this:
def onStartup(session):
message = 'Page path: ' + page.props.path
system.perspective.print(message)
When I launch the project, open the browser dev tools to console, I see this:
No Page path:
info found here. It was very simple in the video, so there must be a simple solution.
Thanks
Edit: The video claims if you refresh the browser, the startup
event should fire again. So I added a session.custom.test01
prop and set that to 100
. Bound a label to it. Refreshed, then closed and relaunched project. Nothing.
Edit 2: My goal is to be able to navigate to the home page when the project loads/session starts. For some reason, even though I have custom security permissions on a particular view, our inventory kiosk almost always opens right to the inventory manager's screen, and that's no bueno.
Also, I just realized that even though I close the windows, it seems there is a cookie or something that remembers that session. So, I pasted the URL into another browser, and the session.custom.test01
was set to 100
.
So, if a session startup requires a cache clear first or closing the browser, assuming it clears cookies on close, is there a work around for this?
Ok, I found that I am using page.props
in the session startup, not the page startup!
I got the page.path
to print, using the correct event! And the session's custom prop test01
to populate with a number correctly.
However, it does look like the browser's cookies/cache needs to be cleared to get the session.startup
event to fire.