Question
Hawaii Medical Service Association
US
Last activity: 7 Feb 2017 19:40 EST
To stop popup windows on double click of a node
Steps to reproduce:
1) Create a Summary Report Defintion
2) Create a Tree Grid Layout
3) Source the Tree Grid by the Report Definition ( provide the name of applies to class of report definition and the name of report definiton name)
4) Run the flow
5) double click one of the nodes in the results
6) Details popup windows opens
There is a summary report definition which is sourced to a Tree Grid Layout. The data is displayed in hierarchy as expected. The hierarchy expands as expected when a the node is single Clicked.
But when a node is double clicked, Details popup windows opens. The requirement is to stop the popup windows while a node is double clicked.
Steps to reproduce:
1) Create a Summary Report Defintion
2) Create a Tree Grid Layout
3) Source the Tree Grid by the Report Definition ( provide the name of applies to class of report definition and the name of report definiton name)
4) Run the flow
5) double click one of the nodes in the results
6) Details popup windows opens
There is a summary report definition which is sourced to a Tree Grid Layout. The data is displayed in hierarchy as expected. The hierarchy expands as expected when a the node is single Clicked.
But when a node is double clicked, Details popup windows opens. The requirement is to stop the popup windows while a node is double clicked.
In what way can the pop up windows be stopped on double click of a node?
***13/10/2016: Updated by moderator: Lochan to update post with original body text that was lost due to a PDN bug; Apologies for the inconvenience caused***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Attached screenshot for configuration.
Pegasystems Inc.
US
Hi,
Please check your Tree Grid layout configuration. Under Actions, is there an action for 'Double-click'? If yes, you can modify/delete it and not allow popup window to be launched. I have attached an OOTB example.
Hawaii Medical Service Association
US
Hi Susan,
Thank you for your reply. I tested by removing the double click event and actions as well. While I traced on a double click, that an activity at @baseclass.pzShowDrillDownReport is called at the beginning. I thought of specializing the activity and use some privilege but the acitvity is final internal, therefore, the system would not let me save as in the appplication class/ruleset.
Pegasystems Inc.
US
HI,
Activity, @baseclass.pzShowDrillDownReport, is an OOTB Final Internal rule, you cannot "save as" it into your application ruleset and modify it.
How was this activity invoked? I thought that you already removed the double click event and action.
Hawaii Medical Service Association
US
Hello Susan,
Yes, I removed the event actions on the double click but the activity is invoked on double click. I unit tested by removing the priviledge to run the report but that stopped fetching any data for the tree grid.
IN
Hello,
Could you please confirm if you have the similar query as below.
https://collaborate.pega.com/question/item-details-pop-windows-double-click-item-hierarchy-tree-node
Hawaii Medical Service Association
US
Hi ,
The question is similar and the earlier discussion has a resolution while the tree grid is sourced via property which is a different design. However, this question is to resolve the issue on the design i.e. stopping popoup on double click of the node while sourcing the treegrid from reporting definition. Has anyone got this issue?
Hawaii Medical Service Association
US
Could there be any resolution?
Pegasystems Inc.
IN
Hi
You can use the below code in UserWorkForm.
/****Code to Insert (START)*********/
<script>
function disableDD(){
var uid = Grids.dataSourceToUId["pyRowsSubSectionTest_idBB.pyGrouping"];
var grid = Grids.map[uid];
grid.disableDD = true;
}
pega.ui.d.attachOnload(disableDD, true);
</script>
/*********Code to Insert (END)***********/
Only thing you need to change in above code is to change the name of page :pyRowsSubSectionTest_idBB. You can find this in your section's pages and classes where you have used the tree grid.
Let us know if this helps :)
Hawaii Medical Service Association
US
Hello rawap,
it seems to disable all clicks. Has it worked for you?
Hawaii Medical Service Association
US
I saved as the UserWorkForm to the application ruleset and tested but did not resolve the issue.
Pegasystems Inc.
IN
Tried the same in my machine and it seems to be working fine. Can you put some alert and check if the code is getting executed and also confirm the page name is correct. Getting the correct page name is the key to find the correct grid.
Hawaii Medical Service Association
US
I again tested with the page name that is auto created in the pages and classes tab of the section where the Tree Grid is saved. One more observation is that all the code is visible at the top of the case as a message while I create any case in the application. What might I have been missing?
Pegasystems Inc.
IN
All the code should be places within <script> tags. Also modified my original response with code.
Let us know if you still face any issues :)
Pegasystems Inc.
IN
Add the code under script tags. That way you wont be observing them as a message while creating cases.
<script> mentioned code </script>
Best Regards,
Mounika
Hawaii Medical Service Association
US
Hi Rawap, Mounika,
Please advise if you got a chance to test the resolution discussed. It seems that it disable other clicks and did not get the desired result.
Pegasystems Inc.
IN
I tried the same at my end and found the issue. Basically script (disableDD function) is getting called before grids are actually loaded so it is not able to find the Grids object.
Please make the same changes to UserWorkForm but remove the line where it was getting called (Line to be removed : pega.ui.d.attachOnload(disableDD, true); ).
/****Code to Insert (START)*********/
<script>
function disableDD(){
var uid = Grids.dataSourceToUId["pyRowsSubSectionTest_idBB.pyGrouping"];
var grid = Grids.map[uid];
grid.disableDD = true;
}
</script>
/*********Code to Insert (END)***********/
Now in your actual grid go to Grid actions and define On Click event and call this function through run script action and that should do the trick.
Let us know if you need more information :)
Accepted Solution
Pegasystems Inc.
IN
Attached screenshot for configuration.