Reputation: 798
I have a GWT application and want to create a pop-out window. It is to implement a printable version of a screen of data from my application which is otherwise very messy to print from. This needs to be a new browser window, launched from my GWT application. No functionality is required on the pop-out, but I want the data to be populated via GWT.
My question is: how can I implement the contents of the browser window in GWT without having to create a new, separate GWT application for it? I don't want to have to re-write the logic to retreive the data in Javascript (this is my current best option), but I also don't want to have to make a brand new GWT application and complicate all of my builds process.
There are a few other similar questions on StackOverflow about this and usually the responses are all "Why do you want to make a new browser window? It's bad practice!" etc etc. My development team have already been through this discussion and are committed to a new browser window, so please assume that this is my only option and focus on the actual question I'm asking here.
I have read that there's ways in Javascript to populate the contents of a browser window from another window (e.g. http://www.javascripter.net/faq/writingt.htm), so perhaps this is an option, but I have no idea how to do this in GWT.
Thanks!
Upvotes: 0
Views: 570
Reputation: 2034
You could could create a separate URL specifically for the "printable view" of your form, and link to it using the Anchor that points to that URL with a target of "_blank" as well. This could still all be managed within your current application.
Upvotes: 1