Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Multiple native windows using the same session
In my web app, I have a flash chart that has clickable points. When these points are clicked, a new native window is opened which navigates to the same URL as my web app but with extra parameters. This new native window is opened through Flash, and this is causing the new native window to use the same session as my main window. This would be advantageous (since I don't have to recreate many system objects) however, I am totally unclear on how I can control the UI of the "new window".
Right now, the "new window" pops up and I can see from the logs, that it only runs through the ParameterHandler code of the MainWindow and visually a blank window is shown. I'm assuming, since it's using the same session it skips the init() and performs a refresh which called on the ParameterHandler.
What I have been able to do, is when the new native window is created and runs through the ParameterHandler I have called a function to create yet another native window via the IT Toolkit, and this works but I have an extra window blank window (the original "new window").
What is the PROPER way to access dynamically created native windows which all use the same session?
I've actually resorted to another method to resolve my issue. I'm still unsure how to work with native windows using the same session.
However, if you create a window at server-side by creating a new Window instance you can use Java variables/references (at server-side) to communicate between the different windows. You can still embed any content (flash, another web page, image, applet,...) to this window using the Embedded component.
There is a small window sample code here:
Btw: If you have downloaded the Sampler source code (included in the zip), take a look at the "Show Java source" button implementation. There is a very nice usability trick associated there: You can open the same content into a native or an embedded window depending how you click the button!