Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Dialog not appearing in touch UI

Avatar

Level 4

Hi All,

 

We have a component where we have added a config dialog using below code in template JSP : 

 

 <script type="text/javascript" id="cq-gen73">
            CQ.WCM
                    .edit({
                        "path" : "${currentNode.path}/config",
                        "dialog" : "<path>/config_dialog",
                        "type" : "",
                        "csp" : "",
                        "editConfig" : {
                            "listeners" : {
                                "afteredit" : "REFRESH_PAGE"
                            },
                        }
                    });
    	</script>

 

 

While we access the page in touch UI above config dialog does not appear. Any quick solution on how to fix and show the dialog in touch UI mode as well?

 

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@ashishkhadpe Please let me know me which AEM version you are using? looks like you are using old version of AEM.

 

See this documentation for more info

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/widgets-ap... 

 

It looks like your JSON is not properly formatted as per documentation.

View solution in original post

8 Replies

Avatar

Community Advisor

@ashishkhadpe 

In AEM we usually have touchui dialog as xml. Like below is the example of the cq:dilaog

<?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="Image Text Component"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<imagePath
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldDescription="Image URL"
fieldLabel="Image URL"
name="./imagePath"
required="{Boolean}true"
rootPath="/content/dam"/>
<title
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Title (Optional)"
fieldLabel="Title"
name="./imagetitle"/>
<shadow
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
name="./isShadow"
text="Shadow Border"
value="yes"/>
</items>
</column>
</items>
</content>
</jcr:root>



Below is the editConfig in xml:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root 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"
cq:dialogMode="floating"
jcr:primaryType="nt:unstructured">
<cq:listeners
jcr:primaryType="nt:unstructured"
afterdelete="REFRESH_PAGE"
afteredit="REFRESH_PAGE"
afterinsert="REFRESH_PAGE"/>
</jcr:root>


Let me know if you are looking for the same, I can provide a sample touchUI dialog.

Thanks,
Nikhil

Avatar

Level 4

Hi @Nikhil-Kumar,

 

Sorry I guess I have not provided complete details in question. I have that script written in my template JSP file. 

 

Component dialog is already migrated to touch UI but on page I am not able to see the option to edit.

Avatar

Community Advisor
What error are you getting ? Can you attach any screenshot for the same.

Avatar

Level 4
Hi @Nikhil-Kumar No error. We are not able to see the edit option in touch UI mode. I suspect because the code written in JSP is specific to classic UI

Avatar

Correct answer by
Community Advisor

@ashishkhadpe Please let me know me which AEM version you are using? looks like you are using old version of AEM.

 

See this documentation for more info

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/widgets-ap... 

 

It looks like your JSON is not properly formatted as per documentation.