onLinked/onUnlinked events not triggering

Hi,

I'm having issues with the onLinked/onUnlinked events triggering. I have developed my app to listen for the events and it works fine in the development environment using localhost, however as soon as I run in production, those events no longer trigger.
For testing I just deploy the same code as development with no modifications just that its now hosted on a proper domain (same as the domain registered in appStudio) rather than localhost.

example code that I'm using to debug this:

JET.onLoad(function() {
JET.onLinked(function () { console.log('linked') })
JET.onUnlinked(function () { console.log('unlinked') })
})

Best Answer

Answers

  • @Zhenya Kovalyov that is unfortunate as we have 2 windows open, 1 with a custom form and the other with a table, where we want to be able to notify the custom form to update based on the selected item in the table only if the windows are linked.


  • @Zhenya Kovalyov that is unfortunate as we have 2 windows open, 1 with a custom form and the other with a table, where we want to be able to notify the custom form to update based on the selected item in the table only if the windows are linked.
  • @nick.beckenham
    I'm not sure I understand you. Even if you could use onLinked/OnUnlinked events, I don't see how they would help your use case. These events are raised when the user links/unlinks the app. Your use case is facilitated by the context sharing. When the user clicks on an item in the table you should call contextChange method. This will trigger onContextChange event in the app with the form, but only if the two apps are linked. Isn't this what you're looking for?

  • @Alex Putkov.

    Doesn't contextChange/onContextChange only give you the RIC and other Instrument specific data? How can I include custom data?
    Furthermore if there were 3 of our App's windows linked together we wouldn't want both of the other 2 windows to show the same page. Rather if we knew they were linked we could setup a message channel and communicate further details to work with multiple windows.
    I realise I can do a message channel without linking, however then it would be confusing for the user if the windows behaved linked/unlinked regardless of the visible window linking.

  • contextChange/onContextChange is designed to share very specific and rigidly structured content. You could add other data to the context you share, but most Eikon apps can only receive RIC as context. Using context sharing you may be able to share additional content between instances of your app, but this needs careful consideration. It sounds like you're interested in implementing fairly complex user workflow in your app, and I cannot say I fully understand it. I advise you to discuss your user workflow requirements with the technical consultant assigned to your project from Refinitiv side.