Refresh only particular component after the edits instead of entire page refresh

umamaheswariy46

20-02-2020

How can we refresh only a specific component after the component edits? instead of the entire page. 

 

we have to generate the images based on dialogue edits right now by using the afteredit.. its refreshing entire page instead of only that component. 

 

Is there any better way to refresh only that component instead of.. refreshing entire page.

 

Thanks In Advance.

 

Accepted Solutions (1)

Accepted Solutions (1)

BrianKasingli

MVP

22-02-2020

Hello @umamaheswariy46,

Within your source code, locate your component, and edit the _cq_editConfig.xml, and replace with:

 

<?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"
    cq:disableTargeting="{Boolean}true"
    jcr:primaryType="cq:EditConfig">
    <cq:listeners
        jcr:primaryType="cq:EditListenersConfig"
        afteredit="REFRESH_SELF"/>
</jcr:root>

 

Or, within the JCR, you can locate your component/cq:editConfig/cq:listeners, to add a new property of "afteredit" to "REFRESH_SELF".

 

The SGAEMSolutions blog provides a very good tutorial (++included, video tutorial) and explanation for cq:listeners in cq:editConfig. There are much more options than refreshing a single component after an edit, check it out here - http://www.sgaemsolutions.com/2019/01/ootbcustom-cqlisteners-in-cqeditconfig.html

Answers (1)

Answers (1)

Arun_Patidar

MVP

20-02-2020

Please check cq:listeners at https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/components-basics.html#EditBeh...

 

e.g.

 

 

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:EditConfig">
    <cq:listeners
        jcr:primaryType="cq:EditListenersConfig"
        afteredit="REFRESH_SELF"/>
</jcr:root>