How to add a GWT module to a dynamically created Iframe

53 views
Skip to first unread message

Gourav Dhelaria

unread,
May 31, 2017, 5:50:44 AM5/31/17
to GWT Users
What's the best way to handle this scenario ?
- Code wise have I would like to have 2 seperate GWT modules. Modules as defined in this page
- Download both modules in a single download, as a js file.
- Run one of the modules in a dynamically created iframe.




Detailed description:

I have a GWT module called 'embed' which generates embed.nocache.js file.
I have another GWT module called 'widget' which generates widget.nocache.js file.

I add embed.nocache.js to my HTML page. This adds a link called 'widget' in the HTML page.
On click of this link, an iframe (say, widget.html) opens. widget.html has a link to widget.nocache.js. This file gets downloaded, gets executed in the iframe and puts a horizontal panel into the iframe.


Now I need to eliminate a seperate download of widget.nocache.js file.

Say I inherit 'widget' module in embed, it gets compiled and downloaded together. How do I initialise the all the 'widget' related javascript in a dynamically created iframe ?  



Can creating a custom linker help ?



Thanks.







Reply all
Reply to author
Forward
0 new messages