Hi,
I need to make a check during the loadcontent of a diloag to remove a tab
Anyone can explain me which is the right code to remove the tab nav1? Thanks
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Dialog" xtype="dialog"> <listeners jcr:primaryType="nt:unstructured" loadcontent="function(dialog) { var d = dialog.findParentByType('tabpanel'); if (...){ //d.hideTabStripItem('nav1'); //this.ownerCt.findById('nav1').remove(); }" /> <items jcr:primaryType="cq:WidgetCollection"> <tabs jcr:primaryType="cq:TabPanel"> <items jcr:primaryType="cq:WidgetCollection"> <tab jcr:primaryType="cq:Widget" title="Profile Property" xtype="panel"> <items jcr:primaryType="cq:WidgetCollection"> <nav1 jcr:primaryType="cq:Widget" title="nav1" itemId="nav1" cqinclude... /> <nav2 jcr:primaryType="cq:Widget" title="nav2" itemId="nav2" cqinclude... /> </items> </tab> </items> </tabs> </items> </jcr:root>
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
Please have a look at these reference articles:-
// How to show or hide tab in dialog in cq
Step 1: give the tab to show/hide an ID
Step 2: add a listener to the selection which you want to handle:
If the selection is 'no' the tab will be disabled, otherwise enabled.
Link:- https://forums.adobe.com/thread/1096389?tstart=0
//Disabling a tab in a dialog dynamically
//ACL approach is the way to go
I hope this might will help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
You should use hideTabStripItem
Here is one example from documentation https://docs.adobe.com/docs/en/cq/5-5/developing/widgets.html#Dynamic Dialogs
Views
Replies
Total Likes
Hi
Please have a look at these reference articles:-
// How to show or hide tab in dialog in cq
Step 1: give the tab to show/hide an ID
Step 2: add a listener to the selection which you want to handle:
If the selection is 'no' the tab will be disabled, otherwise enabled.
Link:- https://forums.adobe.com/thread/1096389?tstart=0
//Disabling a tab in a dialog dynamically
//ACL approach is the way to go
I hope this might will help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Views
Likes
Replies