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.

Reply via email to