Perspective table onRowDoubleClick event not working

Hi,

I have a perspective project that I am having a small issue with. The project uses its own identity manager. If the user is not logged in, they can view the data in a table, but other components, such as buttons are hidden.

When logged in, if a user double clicks a table row, "onRowDoubleClick()" fires a script which checks the user level and if user level is correct, a popup opens which allows them to edit/add to/remove information in a database, based on the table data.

The issue is that if the user is not logged in, I would like a different popup to appear, with limited functionality. However, the "onRowDoubleClick()" event doesn't seem to fire if the user is not logged in.

I also tried adding a script to the "onRowClick()" event as well, but this doesn't seem to fire unless logged in either.

Security on the table is set to public.

I'm not sure what else could be going wrong. Do I need to add a default user that is automatically logged in? Is that possible?

Thanks,
Leigh

Is the script definitely not firing at all? Are you able to put a system.perspective.print() call at the very start of the onRowDoubleClick() to confirm this is indeed the case. This will print to the developer tools console log in the browser (F12).

How are you checking the user level? Is it possible that the script checking the security level / role is throwing an unhandled exception and failing to complete?

1 Like

What @simeonw suggested would be my first step. Let us know what is being printed. If possible, please add some pictures to allow us to better help you.

Thanks for your replies.

All sorted now. There was an unhandled exception further down the script that I was missing.

1 Like