Expand my Community achievements bar.

Force a refresh after change property of a component

Avatar

Level 3

Hi Teachers,

 

I am writing to ask a question about force refreshing after change the property of a component.

 

Background:

There is a dialog window which belongs to a component contains a multi-field component. I try to add the collapse function in the task. 

Screenshot 2023-09-15 at 6.16.24 PM.png


Problem:

In the task I create a new component and create js in the dialog-clientlib. After finishing the task all thing goes fine. But the page will refresh automatically and cannot be edited when I click "tick" at the right top corner. The AEM System Edit page will reload and become uneditable. Why does the things happen ?
However, all things will go normally after I refresh the page again.

 

Thank you.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6.5
5 Replies

Avatar

Community Advisor

Hello @TrifaCh,

 

Please check if there is any cq:EditListenersConfig within the component. If so, that can be the reason of possible refresh after edit. You can remove it to stop the refresh, and then you can debug your custom code for the component. when you debug look for any possibility of infinite looping (or circular event trigger within JS).  

 

https://helpx.adobe.com/experience-manager/kb/RefreshPageWhenModifyDialog.html

 

Thanks 

 

Avatar

Level 3

Thank you very much.

However, I cannot find the property in my component. I think there should be some event triggered by the custom js.

Avatar

Community Advisor

@TrifaCh 

 

This might be an issue specific with your component. I have not seen this discrepancy.

The cq:listeners which generally used to refresh page on component edit, have many trigger events. Can you please check if it is set to afteredit=REFRESH_PAGE. 

If not, can you please try adding and check.

 

http://www.sgaemsolutions.com/2019/01/ootbcustom-cqlisteners-in-cqeditconfig.html


Aanchal Sikka

Avatar

Level 3

Thank you for instruction. I will check my custom js code and try to handle the event listener in the self-defined module.

Avatar

Administrator

@TrifaCh Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni