Quantcast
Channel: CQ 5
Viewing all articles
Browse latest Browse all 35

[DIALOG] Hide/Show panel with tabpanel

$
0
0

How to hide/show a tab on a dialog base on an event of item?


Resolution:

In the sample code, we add a listener to listen ‘change’ event for checkbox.
<listeners jcr:primaryType="nt:unstructured"
selectionchanged="function(comp, val, isChecked) {
   var dialog = comp.findParentByType('dialog');
   var tabpanel = dialog.findByType('tabpanel’);
   if (isChecked) {
   tabpanel.hideTabStripItem(1);//Hide tab at 2nd position
   } else {
   tabpanel.unhideTabStripItem(1)
            }
       }
" />



Viewing all articles
Browse latest Browse all 35

Trending Articles