Question

Can any one please suggest a way to open some pages in a new window in wicket. I am trying to open a new browser window and print using javascript window.print() it content then close and open other and so on after a form is submitted . I am using wicket 1.4.22.

And when i tried it with ModelWindow the window.print() is not printing the model window content but the entire main page.

So i think popupsetting is not suitable for this purpose, and i couldn't find any other option, please help.

Was it helpful?

Solution

For any Link, you can specify PopupSettings, and if you do, the page resulting from clicking that link will be opened in a new window.

There are some examples for this (and other link stuff) which may be helpful. To browse the source code click on the "Source Code" link in the upper right corner.

This is for actually doing it from a click on a link. To do it as a result of a form submission, to trigger a javascript window.print(), and to cycle through multiple invocations of something like this will be more difficult, but this might be useful as a part of your solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top