Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 8

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)

 

2023-02-23 12_56_25.png

 

 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>

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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...

 

Hope it helps!

 

Thanks,

Ritesh Mittal

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

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...

 

Hope it helps!

 

Thanks,

Ritesh Mittal

Avatar

Level 8

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

Thanks

Avatar

Community Advisor

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

Avatar

Level 8

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

Thanks