wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mscoon <msc...@gmail.com>
Subject Opening a stateful page in a new window/tab with ajax
Date Thu, 21 Nov 2019 12:44:27 GMT
Hi all,

We are using the following code inside an ajax callback to create a new
page and open it in a new window. Are there any gotchas with respect to how
we create MyPage and get the url for it? Is it guaranteed to be found in
the user's session when the request for it comes in?

void openPageInNewWindow(AjaxRequestTarget target) {
    Page pg = new MyPage();
    String url = urlFor(new RenderPageRequestHandler(new
     target.appendJavaScript("window.open(\"" + url + "\")");

Is there a better way to do this?

Note that we don't want to use a BookmarkablePage page as an alternative.
We want the new page to be instantiated inside the ajax callback.

Thank you in advance,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message