How to use JET request in a new window?

JET.navigate() is
used in order to open a new window in a separate tab when clicking a button.
After the new window opens, i want to use JET.request() in order to retrieve some data.
The problem is that somehow, the connection to JET is lost and the AppInfo data is empty and I'm not able to make the request.
There is no error in the console. I have a message saying that JET is registered, but in the new window, appInfo is empty.
Any idea?
Best Answer
-
Issue is resolved by adding the following parameters to JET.navigate method
JET.navigate(
"name" : "Web Host App",
"url" : "URL of the page you navigate to”,
"properties" : [
{"ELAppId" : "App ID of your App Studio app"},
{"ELAppProductName" : "App ID of your App Studio app"},
{"ELAppTitle" : "App name of your App Studio app"},
{"ELAppBrowserType" : "Chromium"},
{"ELAppBrowserAffinity" : "Yes"}
]
)0
Answers
-
@fasie, I assume the navigate is loading a resource in your local file system. In that case, the loaded resource has to reference and load JET scripts, before using the JET object. You can download the JET2 bundle as shown in the quick start.
0 -
@fasie
A new window that you open as a result of executing JET.navigate method is a new instance of Chromium browser. To use JET in the new instance of the browser you need to initialize JET by calling JET.init just like you initialize it the first time in your app.0 -
@Alex Putkov, here is how it works:
I have a MVC app. Two windows mean two views. In the first view i initialize JET, everything is ok, the AppInfo contains all the necessary info.
When I click the button which is supposed to open the new window (where JET is also being initialized), it opens the new window, in the console I receive the message "App container is registered with EikonJET", but the AppInfo data is empty.
The next step is to enter a RIC in a textbox and click a button to make the JET request. Here is where it stops working. There is no error.
EikonNow detected Eikon Desktop
App Container registered with EikonJET!
appId is null
0 -
Also, there is one thing that i noticed. If i run the app on the localhost, everything works well, I am able to make the JET request and receive data. The problem is on the published version of the application.
0 -
Is the HTML page loaded in the new window on the same domain as the main page? JET library has a concept of trust levels, which enable/disable some parts of its functionality. You have full trust when the URL is localhost. Similarly
you have full trust when the domain is one of the App Studio registered URLs. But if the domain is not recognized, then AppInfo would be empty and the data requests from Eikon would be disabled.0 -
yes, it is the same domain.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.8K Refinitiv Data Platform
- 625 Refinitiv Data Platform Libraries
- 5 LSEG Due Diligence
- 1 LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 83 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛