Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

AEM 6 afterinsert event Granite UI

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Level 7

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.

View solution in original post

5 Replies

Avatar

Level 10

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

Avatar

Level 10

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

Avatar

Level 7

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.

Avatar

Level 2

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! 

Avatar

Correct answer by
Level 7

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.