Question
Wells Fargo
IN
Last activity: 15 Apr 2016 4:42 EDT
Refresh Tab is not working - On Click action of Tab
Hello,
We have a Tab Group with 3 Tabs, and this Tab Group was placed in a Section. And each tab has configured with a set of actions, to Run a DT to set flags for Tabs visibility and Refreshes the Section (in which the Tab Group was placed). Based on the flags (setting in DT), one or more tabs will be hidden/visible, after the refresh.
Right now, when clicking on any Tab, the actions are not being performed, rather they are being performed when clicks on the section inside the Tab.
Seems a Pega bug, does any one aware of this issue and is there any hotfix available for this?
We are using Pega v 7.1.7
Regards,
Rajesh
Message was edited by: Marissa Rogers - Added Category
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Hi Rajesh,
I see the issue that when you click on any Tab, the actions you configured are not executed, rather they execute when you click anywhere in the body of the Tab.
Can you try doing the below to achieve your requirement, instead of configuring the actions the way you currently have it.
Throw an icon/link on the tab, get rid of the default tab title, then configure your actions on the icon/link. Would this help you at all?
Thank you,
Sunny
Pegasystems Inc.
IN
Hello Rajesh,
In the tab layout, each tab by default has a layout. So whatever names displayed are the container headers of the layout and actions cant be configured on this header.
The actions we configure are on the layouts within these tabs and hence when we click anywhere inside the tabs, actions are invoked.
Try saving the layout as a section which has an option to select defer load and run a pre activity on this Defer load. In this defer load call a data transform
Let us know your observations.
Best Regards,
Mounika
Wells Fargo
IN
Hi Mounika,
Thank you for your explanation. In earlier versions of Pega we have a provision to refresh the Tab on Click. I'm expecting the same to happen here, with a small change - to refresh the other section. I see the Layout Settings and Tab Layout settings are different.
We have tried with including section as Tab, but we dont have option to configure actions on the Tab click. Data Transform can be executed from Differ Load activity, but the visibility conditions on the Tabs, can be applied only when the complete section is refreshed.
In simple words, my requirement is to refresh the Section (in which the Tabbed Group was placed), on click of any Tab. Let me know if there is any other way to do it.
Regards,
Rajesh
Pegasystems Inc.
IN
As already mentioned the tab title is just a label.
OOTB i am not sure whether we can achieve something like this. Others can comment if they have any idea.
Wells Fargo
IN
Yes Mounika, I agree that tab title is just a label. But the actions were configured on the Tab Layout, so I'm expecting the actions should be executed when clicks on the Tab.
But, the actions are getting executed only when clicks inside the layout, and all the property values are getting refreshed every time when clicks any where in the section, trying to select a dropdown etc. which is not useful for me.
I'm just trying to understand what is the purpose of executing these actions, when clicks any where in the section/layout.
Regards,
Rajesh
Accepted Solution
Hi Rajesh,
I see the issue that when you click on any Tab, the actions you configured are not executed, rather they execute when you click anywhere in the body of the Tab.
Can you try doing the below to achieve your requirement, instead of configuring the actions the way you currently have it.
Throw an icon/link on the tab, get rid of the default tab title, then configure your actions on the icon/link. Would this help you at all?
Thank you,
Sunny
-
Pratik raj mishra
Wells Fargo
IN
Thank you sunny for the reply. Yes, the actions are not executing when click on Tab, instead executing when click on section/layout.
If we have a link/icon in the tab cell, it works fine. But, user needs to click on the text to execute actions. So, I was looking for Tab click actions.
At least, this way we can achieve something. Right now, the section/Layout is refreshing whenever user clicks any where on the section, also when trying to choose a value from any dropdown inside the section, so the values are not getting saved to clipboard.
Regards,
Rajesh
Pegasystems Inc.
IN
Hi Rajesh
This mayn't be a bug as you are trying to trigger an event on click of Layout container header and i believe the design wasn't intended to configure events on header rather the events are configured on the DynamicLayout which comprises the layout but not container header.
This is not specific to Tab Group layout, you may try configuring the same on a simple dynamic layout with container header.
But we can achieve this using custom script where we can call an activity(which should accomplish your requirement) or perform some other action.
Pegasystems Inc.
IN
Hi Rajesh
Just before working on this script inspect the tab elements in DOM and see if the Tab elements are generated in <li> tags because in some cases tab elements may be generated in <td> tags
Write below script and included it in section containing tabs.
<script>
var eles = document.getElementsByTagName("li");
var i=0,count=0;
for(i;i<eles.length;i++ )
{
if(eles[i].hasAttribute("tabGroupName"))
{
var el=eles[i];
count++;
eles[i].onclick=function(){
var ev=this;
var tabSelected =this.title; // this could vary because if we are dirctly using Tab containers then the object will have textContent instead of title
var oSafeURL = new SafeURL("Gous-GCSWorkApp-Work.MyTestActivity");
oSafeURL.put("TestParam", tabSelected);
var strReturn = pega.util.Connect.asyncRequest('POST',oSafeURL.toURL(),'','');
};
}
}
alert("no of tabs are "+count);
</script>
In the below steps:
Hi Rajesh
Just before working on this script inspect the tab elements in DOM and see if the Tab elements are generated in <li> tags because in some cases tab elements may be generated in <td> tags
Write below script and included it in section containing tabs.
<script>
var eles = document.getElementsByTagName("li");
var i=0,count=0;
for(i;i<eles.length;i++ )
{
if(eles[i].hasAttribute("tabGroupName"))
{
var el=eles[i];
count++;
eles[i].onclick=function(){
var ev=this;
var tabSelected =this.title; // this could vary because if we are dirctly using Tab containers then the object will have textContent instead of title
var oSafeURL = new SafeURL("Gous-GCSWorkApp-Work.MyTestActivity");
oSafeURL.put("TestParam", tabSelected);
var strReturn = pega.util.Connect.asyncRequest('POST',oSafeURL.toURL(),'','');
};
}
}
alert("no of tabs are "+count);
</script>
In the below steps:
call some activity(in the below case MyTestActivity) and specify it's class . In the activity configure a property "TestParam". In the activity you can set the property of your choice and do the configuration as required.
var oSafeURL = new SafeURL("Gous-GCSWorkApp-Work.MyTestActivity");
oSafeURL.put("TestParam", tabSelected);
Please respond if any issues on this.