Question
BNY Mellon
US
Last activity: 17 Jul 2017 15:59 EDT
Javascript API for closing all tabs?
Is there a Desktop API to close all tabs?
[from unanswered PDN question last August.] I have a question from our developers on this. It's probably easy to do, but I haven't looked into it yet.Maybe someone else has written it?
One consideration is whether individual tags are dirty (have been edited). Is there some visual indicator to advise such (using a different color for a tab or adding a pencil icon). None I see in v7.1.5.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
To answer your question - "Is there a Desktop API to close all tabs?"
If you are using dynamic container, you can use the pega.desktop.closeAllDocuments() function in the pega_desktop_api.js file.
Thanks,
Sunny
Pegasystems Inc.
JP
I just tried calling it by "Run Script" click event action on my laptop (ML7) without success.
javascript:pega.desktop.closeAllDocuments didn't work.
So, how this desktop api should be called?
Pegasystems Inc.
US
Does Sunny's response answer your question? Can we mark it as answered?
BNY Mellon
US
One of my developers tried it this morning, he ran into unspecified problems, so I told him to try it again, and specify them, this time. :-)
Pegasystems Inc.
US
I'm not promising that it will still be there when Pega 7.1.8 is released, but I am testing a beta version of 7.1.8 and there is a Close All option available all the time in my portals now, where in previous versions of Pega7 it only appeared if the width of the window was too narrow to show all the tabs in my dynamic container. I think this is a great enhancement to the product and one that my users have been asking about since we moved to a responsive portal in 7.1. It also keeps me from building my own version of a Close All button, which I did not want to do.
Pegasystems Inc.
JP
Hi Jim,
> It also keeps me from building my own version of a Close All button, which I did not want to do.
Can you share your implementation anyway?
I just tried calling it by "Run Script" click event action on my laptop (ML7) without success.
javascript:pega.desktop.closeAllDocuments didn't work.
Pegasystems Inc.
US
Pegasystems Inc.
JP
Cool!
Virtusa
LK
In CPM Portal 7.1.3 on Pega 7.1.8, same solution i have applied in button action --> Run Script; but no luck. it does not work?
Unable to close all tabs?
Is there any solutions?
We have agents who can serve many clients, each client has its own application. When Agent works in an application for a client here can receive call from other client then when he accept call pop up system should switch to corresponding application and need to close all recent tabs before switch application.
"pega.desktop.closeAllDocuments"
event javascript:event
This is not working??? I have tried CPM Clearing activities but some how D_CPMPortalRecents page populated by earlier interactions ? How to clear out this Data page?
Property-Remove or Page-Remove or Update page with update time: anything is not success!!!!
Pegasystems Inc.
US
Are you sure that CPM is using a multi-document dynamic container ? I thought that for CPM, the tabs were repeating dynamic layout and the dynamic container was an iframe less mode. in this case, this would not work.
To confirm check where the dynamic container is used and its configuration.
For example, pega.desktop.closeAllDocuments on the designer studio will close all the tabs because it is using a multi-doc DC
Virtusa
LK
It is repeating dynamic layout with Data Page. Is there any way to close all tabs for this set out by calling client side function?
Updated: 11 Sep 2015 1:50 EDT
Pegasystems Inc.
IN
You can try calling pzClearAllRecentItems directly on click.
If you need this from JS then you can make an asyncRequest to above API.
Note: Though you are in enduser portal it also closes designer studio tabs, if you have launched enduser portal from designer studio.
If you need some other solution without closing designer studio tabs I can give you that too.
Agora Group Inc
US
Hi Richard,
We were able to close all work item tabs with above suggestion. Apart from work item tabs, we have some other tabs in our caseworker portal. Is there a way to set tabindex on this script call so that focus moves to desired tab on reload ?
Thanks!
Virtusa
LK
Thank you so much Venu. I have played around CPMClearChildRecents. but standalone calling does not work out. I directly called pzClearAllRecentItems in button action as run activity it works