question

Upvotes
Accepted
966 11 19 26

How can we transfer data from A app to B app using JET in Eikon?

jetapphtml
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
13.7k 26 8 12

Re: your comment "... how can we pass a chunk of data via this method and ... read it in app B".

There are a number of examples of using JET.navigate to open different objects in the JET Demo App (you can find it under Core Functionality).

If this is a web app, then the best way to pass data/state to it would be over the URL you are calling to open it.

The most flexible way to pass additional data to the App, after it’s created, would probably be to use Pub/sub messaging on JET. The amount you can send over this is pretty unlimited, providing you use common sense chunking. You would just want to establish a private handshake between the 2 Apps once the second one was loaded. We are introducing the concept of targeting into the pub/sub APIs for JET – though this is still under development.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Looks like we need to modify our current app to use Pub/sub messaging on JET. Before that, can we use Active Context like the below example?

JET.navigate({
                name: "Eikon Explorer App",
                entities: [
               { RIC: "MSFT.O" },
                { RIC: "C.N" },
                { RIC: "XON.N" },
                { RIC: "HPQ.N" }
            ],
                url: url
});

Yes, you can sent it like this:

var data = {
          target: "popup",
          url: "http://localhost:8888/receiver.html",
          entities : [{
               RIC: "MSFT.O"
          }, {
               RIC: "C.N"
          }, {
               RIC: "XON.N"
          }, {
               RIC: "HPQ.N"
          }]
     };
JET.navigate(data);

And receive it like this:

JET.onContextChange(function(contextData) {
          console.log(contextData);
     })
Upvotes
13.7k 26 8 12

You can use JET.navigate to open another app programmatically, with context.

Here is an example of the mechanism you will use, to open a chart in a popup window:

var data = { target: "popup",
   location: { x: 100, y: 100, width: 300, height: 300 },
   name: "Graph",
   entities: [{ "RIC": "GOOG.O"  }]};
JET.navigate(data);

And another one for a Web App/Views Explorer:

var data = { target: "popup",  // open a popup window
   location: { x: 100, y: 100, width: 300, height: 300 },
   url: "cpurl://views.cp./Explorer/GxHOME.aspx"};
JET.navigate(data);
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thanks Christiaan

Can you also let us know how can we pass a chunk of data via this method and also would like to know how to read it in app B.

Click below to post an Idea Post Idea