Refresh only particular component after the edits instead of entire page refresh | Community
Skip to main content
Umamaheswari_Yakkala
Community Advisor
Community Advisor
February 21, 2020
Solved

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

  • February 21, 2020
  • 2 replies
  • 4404 views

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.
Best answer by BrianKasingli

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

2 replies

arunpatidar
Community Advisor
Community Advisor
February 21, 2020

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>

 

 

Arun Patidar
Umamaheswari_Yakkala
Community Advisor
Community Advisor
February 21, 2020

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 ?

BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 22, 2020

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