Hi all,
I'm trying to handle entity events against"Setting" entity, without success.
I need to be notified when a specific setting is changed per user, so I thought that using EventBus would be a good way to do that.
Isn't it?
Any solutions?
Thanks!
6 Answer(s)
-
0
What have you tried?
-
0
<cite>aaron: </cite> What have you tried?
I did create a class that implements IEventHandler<EntityCreatedEventData<Setting>>, IEventHandler<EntityUpdatedEventData<Setting>>
but interface's methods are never called!
-
0
@fabiovalerio have you also implemented ITransientDependency interface like below ?
public class MyEventHandler : IEventHandler<EntityCreatedEventData<Setting>>, IEventHandler<EntityUpdatedEventData<Setting>>, ITransientDependency { ..... ..... }
-
0
<cite>ismcagdas: </cite> @fabiovalerio have you also implemented ITransientDependency interface like below ?
public class MyEventHandler : IEventHandler<EntityCreatedEventData<Setting>>, IEventHandler<EntityUpdatedEventData<Setting>>, ITransientDependency { ..... ..... }
yep! without any success ... but, honestly, I did a lot of tries ... so I'll give it a try and report back.
Furthermore, I already have another EventHandler against a custom entity that works perfectly without ITransientDependency inheritance!
-
0
Hi guys... I just did a retry to @ismcagdas's suggestion... and all works like a charm!
Maybe when I did try for the first time something was wrong in my implementation.
Thank you @ismcagdas and @aaron too!
-
0
thanks for your feedback ;)