on 10-11-2016 6:51 PM
Hi,
there was a question about this in the new archive section, just wondering if this has been addressed in the latest release of Screen Personas
Dan.
Yes.
Use this in the onLoad script for the screen:
session.findById("wnd[0]/mpop").hide();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tamas,
it looked very promising, but after two years it seems to be outdated. The problem is still the same: I have to prevent the user to do anything listed in context menus appearing on right click.
The above code delivers following error once. Then it's visible only in console.
"Error during script execution. Your script is accessing a control of type 'GuiContextMenu' with an control ID that has changed in your current system (kernel version 7.53 or greater) from the system in which the script was initially created. The script uses the ID 'wnd[0]/mpop' with the ID prefix 'mpop' but should be 'wnd[0]/mnu' (new prefix 'mnu'). Please change the script accordingly."
When I just change mpop to mnu nothing happens. In debugger i put "session.findById("wnd[0]/mnu")" into watch. Under "visible" property it says: "Control 'wnd[0]/mnu' not found". "Enabled" is the same. Maybe it's that I hid the menu bar earlier. But I also tried to reactivate it. Type is recognized correctly, it just might not be under wnd[0], I guess.
Do you know any object browser capability of the active screen?
Or maybe can you provide an up-to-date solution?
Thank you for your answer!
Kind Regards,
Peter Toth
I think you are testing this in Slipstream, correct?
I noticed that while session.findById("wnd[0]/usr/mnu").hide(); works fine when using the personas service, it is indeed not effective in SE. Also, while it is possible to select individual context menu items in Personas, the same is not working in SE because the context menu disappears as soon as you activate the Inspector. I created a bug report to address these problems.
Until the SE fix is provided (which I hope will not take too long), you could disable unwanted user actions by intercepting those commands, using return true in your script for those cases. You can look into this KB article for some (indirect) hints how to do this. Not optimal, but at least it avoids some action that should be definitely prevented.
Hi Tamas,
thank you for the advise. This option was on the table too, but management trusts users more than I, so they decided to just wait for the straight solution.
/*We also had an issue with cl_gui_frontend_services=>execute (pdf icon in a cell of an alv being clicked should open pdf in browser (http address)). Nothing happens, and in the REST answer I find it's been rejected. I think we opened a note for it. However I solved it to work in an even nicer way.
This was just FYI.*/
Kind Regards,
Peter Toth
This works for me in Screen Personas 3 SP02:
Onload-Event:
session.findById("wnd[0]/mpop").hide();
Regards Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.