I have a WebPage
in Wicket with PageParameters
so that it could be used via BookMarkablePageLink
.
I can open it also giving:
setResponsePage(MyPage.class, params);
, but what I cannot do is open it similar way as a new tab.
I use a form and there in onSubmit()
-method I want to call the page and place it to tab. I cannot figure out how I could
a) validate form
b) open the page on successful validation
c) page appearing in a new tab.
How to make the part c
? I know how to validate and open page, please help me about the opening to a tab.
For the form I give target="_blank"
, but did not help, maybe due the fact of using the setResponsePage()
method.
EDIT:
This is not a duplicate of Open new Tab when button is clicked because none of solutions worked.
Page is opened in AjaxSubmitLink
's onSubmit()
method with setReponsePage()
. I have to validate form before sending, thus direct Bookmarkable link or form is not a case. Adding to tag target="_blank"
works if you directly open after click. I have to validate first and then I try to set the response page like stated above.