AEM 6.4.x:hide/show in AEM component dialog not showing/hiding | Community
Skip to main content
jayv25585659
Level 8
February 23, 2023
Solved

AEM 6.4.x:hide/show in AEM component dialog not showing/hiding

  • February 23, 2023
  • 2 replies
  • 1218 views

so this is what I see from the dialog (using XML from 2nd tutorial). I tried selecting both options several times and nothing is showing and hiding. (The results is the same for my own XML and all tutorials)

 

 

 I also tried the one from these links and same resuilts. Any ideas on where to look?

- first tutorial from Adobe AEM community

second tutorial from aemhints.com 

 

This is my own XML

 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured" jcr:title="Test dialog" sling:resourceType="cq/gui/components/authoring/dialog"> <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <tooltiptype granite:class="cq-dialog-dropdown-showhide" jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/select" emptyOption="{Boolean}false" fieldDescription="Tooltip type selection" fieldLabel="Tooltip type" multiple="{Boolean}false" name="./data/tooltip/type"> <granite:data jcr:primaryType="nt:unstructured" cq-dialog-dropdown-showhide-target=".tooltip-path-showhide-target"/> <items jcr:primaryType="nt:unstructured"> <typetext jcr:primaryType="nt:unstructured" selected="{Boolean}true" text="Text" value="text"/> <typerichtext jcr:primaryType="nt:unstructured" text="Richtext" value="richtext"/> </items> </tooltiptype> <textContainer jcr:primaryType="nt:unstructured" granite:class="hide tooltip-path-showhide-target" sling:resourceType="granite/ui/components/foundation/container"> <granite:data jcr:primaryType="nt:unstructured" showhidetargetvalue="text"/> <tooltiptexttype jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/textfield" fieldLabel="Text Tooltip" name="./data/tooltip/type-text"> </tooltiptexttype> </textContainer> <richTextContainer jcr:primaryType="nt:unstructured" granite:class="hide tooltip-path-showhide-target" sling:resourceType="granite/ui/components/foundation/container"> <granite:data jcr:primaryType="nt:unstructured" showhidetargetvalue="richtext"/> <tooltiprichtexttype jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/textfield" fieldLabel="Richtext Tooltip" id="./data/tooltip/type-richtext" name="./data/tooltip/type-richtext" renderReadOnly="{Boolean}false"> </tooltiprichtexttype> </richTextContainer> </items> </content> </jcr:root>

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ritesh_Mittal

Hi @jayv25585659 ,

 

I noticed you are using mix of Coral 2 and Coral 3 granite components. I would suggest to use Coral 3 and try below explanation. 

 

https://levelup.gitconnected.com/aem-conditionally-show-or-hide-fields-in-touchui-dialogs-with-coral-3-ie-aem-6-3-bfd48c261012

 

Hope it helps!

 

Thanks,

Ritesh Mittal

2 replies

Ritesh_Mittal
Community Advisor and Adobe Champion
Ritesh_MittalCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 23, 2023

Hi @jayv25585659 ,

 

I noticed you are using mix of Coral 2 and Coral 3 granite components. I would suggest to use Coral 3 and try below explanation. 

 

https://levelup.gitconnected.com/aem-conditionally-show-or-hide-fields-in-touchui-dialogs-with-coral-3-ie-aem-6-3-bfd48c261012

 

Hope it helps!

 

Thanks,

Ritesh Mittal

jayv25585659
Level 8
March 7, 2023

did not fix it. any other suggestion? I can get a checkbox (and then show a container) to work. but not a dropdown.

Thanks

arunpatidar
Community Advisor
Community Advisor
February 23, 2023

you have to change

granite/ui/components/foundation/container

with

granite/ui/components/coral/foundation/container

 

Coral2 type does not know about granite:data node 

 

 

Arun Patidar
jayv25585659
Level 8
March 7, 2023

did not fix it. any other suggestion? I can get a checkbox (and then show a container) to work. but not a dropdown.

Thanks