Foros de discusión

Vaadin Portlet in Liferay Printing Issue

Richard Guerrini, modificado hace 9 años.

Vaadin Portlet in Liferay Printing Issue

New Member Mensajes: 19 Fecha de incorporación: 28/10/13 Mensajes recientes
Hello all,

I am trying to print the contents of a newly created Vaadin Window (and nothing else). I can get the whole page to print, but I cannot isolate the content of the new sub window.
The code is simple; creating the Window:


Window sw = new Window("Receipt");
		sw.setContent(new PrintWindow(url));
		sw.center();
		myUi.addWindow(sw);


PrintWindow class:


BrowserFrame browser = new BrowserFrame("Browser",
		            new ExternalResource(url));
			browser.setHeight("575px");
			browser.setWidth("655px");
			addComponent(browser);
                        JavaScript.getCurrent().execute(
		            "  print();");


Any help is greatly appreciated.

Thanks!

<liferay.version>6.0.6</liferay.version>
<vaadin.version>7.2.0</vaadin.version>
thumbnail
David H Nebinger, modificado hace 9 años.

RE: Vaadin Portlet in Liferay Printing Issue

Liferay Legend Mensajes: 14915 Fecha de incorporación: 2/09/06 Mensajes recientes
Yeah, that's the thing, the vaadin portlet is part of the whole portal page but printing is based on the browser's view of the page, not a portion of the page.
Richard Guerrini, modificado hace 9 años.

RE: Vaadin Portlet in Liferay Printing Issue

New Member Mensajes: 19 Fecha de incorporación: 28/10/13 Mensajes recientes
Can I have the portlet open a new Tab and automatically print it right away?

Thanks!
thumbnail
David H Nebinger, modificado hace 9 años.

RE: Vaadin Portlet in Liferay Printing Issue

Liferay Legend Mensajes: 14915 Fecha de incorporación: 2/09/06 Mensajes recientes
That's going to prove pretty tough I believe...

From the one page (portlet), you have to open another tab pointing to a URL that would map back to a servlet that somehow would be able to render the necessary Vaadin page using the Liferay and Vaadin themes, somehow having the Vaadin servlet (not portlet) restore the correct context so it matches the Vaadin portlet content...
thumbnail
Vishnu Mohan, modificado hace 9 años.

RE: Vaadin Portlet in Liferay Printing Issue

New Member Mensajes: 19 Fecha de incorporación: 14/10/14 Mensajes recientes
Hi,
I also have some problems, when adding my Vaadin(Vaadin 6) application liferay portlet. I added and maximize the portlet to view it as full, then i got my whole page to print on the portlet. But the scrolling is not working.

Thanks in advance.