how to send org.osgi.service.event.Event to frontend javascript

Avatar

Avatar
Validate 1
Employee
tasunil
Employee

Like

1 like

Total Posts

20 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Employee
tasunil
Employee

Like

1 like

Total Posts

20 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
tasunil
Employee

16-04-2021

I have a requirement where i need to update the status of an icon based on an 

org.osgi.service.event.Event

 the icon needs to be hidden or visible or title needs to be changed based on the value of that event. How can we send this event to the front end javascript so that i can update the ui according to this?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,135 likes

Total Posts

3,167 posts

Correct reply

1,080 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,135 likes

Total Posts

3,167 posts

Correct reply

1,080 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

18-04-2021

This is not that easy for some reasons:

  1. Native AEM does not support a server-side-push possibility.
  2. Your client needs to register its interest ini a certain OSGI event on the server.
  3. How would play together via cache? You would need to bypass for this type of push.

With these constraints I think that you should design your application in a way, which is capable to avoid this dependency, mostyl for scalability reasons.

 

Answers (2)

Answers (2)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,322 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,322 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

16-04-2021

Hi,

Do you need to update the icon asynchronously or on page load.

If it is on page load then you can read those node values using nodepath.json and update it.

 

But if there is a monitoring/dashborad page that needs to be updated, in that case, you need to write a polling service in javascript to fetch the same data and update the icon, title.

Avatar

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

195 likes

Total Posts

213 posts

Correct reply

60 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

195 likes

Total Posts

213 posts

Correct reply

60 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile
KiranVedantam1992
Level 7

16-04-2021

Hi @tasunil,

 

Once you get the required value in sightly, you can share it with the front end as per my answer here.

 

Hope this helps.

 

Thanks,

Kiran Vedantam