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 PageProvider(pg))).toString(); 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, Marios