I found this thread, maybe can help you.
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/eea48bafbe8eed63?pli=1

regards

2011/10/27 Mike Dee <mdichiapp...@gmail.com>

> It seems easy to popup a new window, but I'm not sure how to stick the
> HTML into it.  If Window.open would return a reference to the window,
> I could see a way to do it.
>
> Here is another idea.  I can create another module to the GWT app.
> It's sole purpose is to handle printing.
>
> The GWT app I'm working on is based on Activities and Places.  The
> layout is based on a DockLayoutPanel, which contains a bunch of UI
> stuff (that appears when printing and is not wanted).  The new module
> will simply contain an HTML panel.
>
> So the benefits of a new module are: works in standard GWT environment
> (without much hacking) and allows a different layout from main app.
>
> On Oct 26, 9:07 am, Jeff Chimene <jchim...@gmail.com> wrote:
> > On 10/26/2011 08:38 AM, Mike Dee wrote:
> >
> > > I was thinking about something like that.  In the posts about popup
> > > windows this is seen as a negative because it is tricky to setup
> > > communications between the main window and the popup.  But there
> > > really is no communication needed in this case.
> >
> > > Do you see the popup window as a GWT window or just a straight HTML
> > > window?
> >
> > The latter. This is one of those cases where I think that using GWT to
> > create the child window doesn't get you anything except a "problem
> > solved!" endorphin rush. As I said earlier, the solution can be made
> > arbitrarily complex, so I'm sure that someone will chime in with a
> > reason to implement the popup using GWT methods.
> >
> > To follow-up on the CSS: I've noticed that when there's a reference to a
> > CSS with media type "print", then FF opens a print dialog automatically.
> > I think Chrome does this too.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > On Oct 26, 7:55 am, Jeffrey Chimene <jchim...@gmail.com> wrote:
> > >> On 10/26/2011 1:02 AM, Mike Dee wrote:
> >
> > >>> I have an app that creates reports, which are basically HTML.  The
> > >>> reports need to be printed and that is what I'm trying to figure out.
> >
> > >>> I'm porting an older app - that is more of traditional web app.
> > >>> Reports are displayed in a page - with a UI wrapped around them.
>  When
> > >>> a user wants to print a report, he clicks a "print" link, which pops
> > >>> up a window with a printer friendly version (no UI elements).  He can
> > >>> then selects the browser's print command.  Works nicely.
> >
> > >>> I'm trying to figure out how to do that in GWT.  I can display a
> > >>> report.  Printing doesn't work well, because it prints all the UI
> > >>> stuff too.
> >
> > >>> I've looked into separate popup windows.  Most of the messages here
> > >>> recommend against doing it.  Instead they suggest using a Dialog box.
> > >>> I've tried it and created a Dialog with simply an HTMLPanel.
>  However,
> > >>> selecting File->Print (in the browser) prints the entire page (the
> > >>> entire window).
> >
> > >>> Any suggestions on a way to do this?
> >
> > >> Here's one idea I've implemented. It's amenable to arbitrary levels of
> > >> complexity.
> >
> > >> Your UI posts a request to your server on user action (e.g. a button
> > >> click event), and opens the result in a new window:
> > >> <button type="submit">
> > >> <form action="printTheCurrentReport" _target="_blank" method="get">
> > >> <!-- Depending on how you manage sessions, you might want a session ID
> > >> token in a hidden field -->
> > >> </button>
> >
> > >> Reminder: you should have css for print media.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to