Support Article
Actions configured on tab layout are not triggered on click
SA-31826
Summary
User was provided HFix-30839 that is meant to address an issue with layout group tab based off this PDN article:
https://pdn.pega.com/support-articles/event-tab-layout-do-not-get-triggered
This functionality has been enhanced in Pega 7.2.1 so that click actions would trigger on click of the tab, rather than the content.
Developer was expecting this functionality to work for Tab Group layout, not Layout Group tab.
Error Messages
Not applicable
Steps to Reproduce
1. Create a Tab Group layout.
2. Add 2 layouts one for each tab.
3. Add click actions to the first tab.
4. At runtime, verify that click action is not executed if click happens on the header of the tab. It only works when the click is inside the body (content) of the tab.
Root Cause
This issue was determined to be a product enhancement request.
Resolution
For the current release, perform the following local-change:
Note that the title of the tab in this scenario is 'File Manager'.
Replace it with correct title in the scenario for the local change to work.
Similarly 'DocSec' is the name of the section in the second tab that needed to be refreshed on click of File Manager in this particular scenario.
That needs to replaced appropriately as well.
<script>
$(document).ready(function (){
$("li[title='File Manager']").on('click', function(){
var sectionNode = pega.u.d.getSectionByName("DocSec");
if(sectionNode) {
pega.u.d.reloadSection(sectionNode, '', false, false, '-1', false);
}
});
});
</script>
$(document).ready(function (){
$("li[title='File Manager']").on('click', function(){
var sectionNode = pega.u.d.getSectionByName("DocSec");
if(sectionNode) {
pega.u.d.reloadSection(sectionNode, '', false, false, '-1', false);
}
});
});
</script>
Published January 11, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.