Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Hide/Show CheckBoxGroup in Dialog

Avatar

Level 5

Hi 

I am trying to Hide/Show checkbox group when dialog's loadContent called, but not able to do so. Below is my code :

function(dialog) { var compPath = dialog.path; console.log("compPath ::: "+compPath); var sliderPath = compPath.replace("/par/slider/par/slide", "/par/slider"); console.log("Slider Path "+sliderPath); var data = CQ.Util.eval(CQ.HTTP.get(sliderPath+".json")); console.log("data ::: "+data); var value = data['selectiontype']; console.log("selectiontype ==== "+value); //test if(value == 'test') { var pan1 = dialog.findById("layout2"); pan1.hide(); console.log("pan1 ::: "+pan1); } }

Here pan1 coming null. Below is the dialog file:

<items jcr:primaryType="cq:Widget" xtype="tabpanel"> <items jcr:primaryType="cq:WidgetCollection"> <panel1 jcr:primaryType="cq:Panel" title="Slide"> <items jcr:primaryType="cq:WidgetCollection"> <one jcr:primaryType="cq:Widget" fieldLabel="one" itemId="layout2" name="./one" type="checkboxgroup" xtype="selection"> <options jcr:primaryType="cq:WidgetCollection"> </options> </one> <two jcr:primaryType="cq:Widget" fieldLabel="two" itemId="layout1" name="./two" type="checkboxgroup" xtype="selection"> <options jcr:primaryType="cq:WidgetCollection"> </options> </two> </items> </panel1> </items>
1 Accepted Solution

Avatar

Correct answer by
Level 10
1 Reply

Avatar

Correct answer by
Level 10