Refresh only particular component after the edits instead of entire page refresh | Community
Skip to main content
Umamaheswari_Yakkala
New Participant
Feb 21, 2020 12:48 AM UTC
Solved

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

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.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrianKasingli
BrianKasingliAccepted solution
New Participant
Feb 22, 2020 1:17 PM UTC

Hello @umamaheswari_yakkala,

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

4 replies

BrianKasingli
BrianKasingliAccepted solution
New Participant
Feb 22, 2020 1:17 PM UTC

Hello @umamaheswari_yakkala,

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

Translate
arunpatidar
New Participant
Feb 21, 2020 1:26 AM UTC

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

 

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>

 

 

Translate
Arun Patidar
Umamaheswari_Yakkala
New Participant
Feb 21, 2020 3:37 AM UTC

This is not working. We are generating an image based on JSON... when I tried using Refresh_self it's not working. Is there any other way can we do ?

Translate