AEM 6 afterinsert event Granite UI | Community
Skip to main content
Bernardjug
October 16, 2015
Solved

AEM 6 afterinsert event Granite UI

  • October 16, 2015
  • 5 replies
  • 2148 views

Hello 

my custom component doesn't fire the afterinsert event on Granite UI.

The listeners configuration is
afteredit = function () { console.log('afteredit'); }
afterinsert = function () { console.log('afterinsert'); }

(This are tests function, what I need is to use REFRESH_PAGE)

both events fire well on Classic UI, but afterinsert event doesn't work on Granite UI

Do you have a clue to help me resolve that ?
Is there a way I can debug this event ?

Thank you for your answer

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 Dinu_Arya

Hi,

I have tried what you said and I'm able to get the alert.

I tried below -

I have created cq:editConfig and under that I have created cq:listeners and added property afterinsert. To this I have added

function(){alert("Hi");}

I'm getting the alert.

Thanks,

AryA.

5 replies

smacdonald2008
Level 10
October 16, 2015

Here is Granite API docs:

http://docs.adobe.com/docs/en/cq/current/touch-ui/granite-reference.html

Now if events are not firing in your code where its suppose to be firing - it may be a bug. If this continues - please file a bug - 

http://helpx.adobe.com/marketing-cloud/experience-manager.html

smacdonald2008
Level 10
October 16, 2015

Here is Granite API docs:

http://docs.adobe.com/docs/en/cq/current/touch-ui/granite-reference.html

Now if events are not firing in your code where its suppose to be firing - it may be a bug. If this continues - please file a bug - 

http://helpx.adobe.com/marketing-cloud/experience-manager.html

Dinu_Arya
Level 6
October 16, 2015

Hi. afterinsert is working fine for me in touch-ui view with REFRESH_PAGE. For u it's not working with REFRESH_PAGE? I will check it with ur functions and let u know.

Daniel245
Level 2
October 16, 2015

I have a component that has a parsys inside of it.

If the parsys is included in the sightly html component file; afterinsert is not fired.

 

As soon as I remove the parsys from the component it fires. Please help! 

Dinu_Arya
Dinu_AryaAccepted solution
Level 6
October 16, 2015

Hi,

I have tried what you said and I'm able to get the alert.

I tried below -

I have created cq:editConfig and under that I have created cq:listeners and added property afterinsert. To this I have added

function(){alert("Hi");}

I'm getting the alert.

Thanks,

AryA.