When we are developing AEM component we came up with a lot of situation where we want to show tabs on the basis of selection. And in selection also we have two scenarios.
Scenario 1: when we want to show a number of selected tabs. example if we select tab 6 from dropdown so our component will show 6 Tabs. for reference please see the screenshots below
showhidetabs.js
for this create a clientlib and add categories as cq.authoring.dialog and paste the js file in clientlib folder. For reference see the screenshot below
Scenario 1: when we want to show a number of selected tabs. example if we select tab 6 from dropdown so our component will show 6 Tabs. for reference please see the screenshots below
To solve this scenario I am giving the sample code for cq_dialog.xml code and js code.
cq_dialog
showhidetabs.js
for this create a clientlib and add categories as cq.authoring.dialog and paste the js file in clientlib folder. For reference see the screenshot below
Once you are done with those changes add other things like cq_editConfig and write the HTML code for the component and then the component will work perfectly.