On Fri, Oct 25, 2013 at 12:17 PM, <[email protected]> wrote:
> Hi Martin,
>
> For clarification, the problem is that the result is rendered in the
> inlineFrame ( IFrame ).
>
I can see that.
> How can I have an Ajax submit with the same behavior as 'target="_blank"'?
>
The question is: does it need to be Ajax submit at all ? With non-Ajax
submit the '_blank' will be used and the current page with the iframe won't
be reloaded.
If you want to be Ajax submit then do something like:
target.appendJavaScript("window.open('', "+newUrl+")")
>
>
> Martin Grigorov <[email protected]> schreef:
>
> Hi,
>>
>>
>> On Fri, Oct 25, 2013 at 11:40 AM, <[email protected]> wrote:
>>
>> Dear Wicketeers,
>>>
>>> I am puzzling how to break out of an inlineFrame ( IFrame ) on an form
>>> submission. I have an a Form in a InlineFrame. The result of submitted
>>> this
>>> form should be opening a new tab/ page.
>>>
>>> The code:
>>>
>>> Form form = new Form("form")
>>>
>>> ....
>>>
>>> AjaxSubmitLink submitButton = new AjaxSubmitLink("submitButton", form) {
>>>
>>> @Override
>>> protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
>>>
>>>
>>> getRequestCycle().****scheduleRequestHandlerAfterCur****rent(new
>>> RedirectRequestHandler(newUrl)****);
>>>
>>> }
>>> }
>>>
>>> HTML:
>>>
>>> <form wicket:id="form" id="form" method="get" target="_blank">
>>>
>>>
>> The problem is that you use AjaxSubmit and thus 'target="_blank"' is not
>> used at all.
>>
>>
>> ....
>>> <span class="button link"> <input wicket:id="submitButton"
>>> type="submit"/>
>>> </form>
>>>
>>>
>>> Has anyone dealt with such an issue or has any pointers how to approach
>>> this issue?
>>>
>>> Regards,
>>>
>>> Haiko
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail:
>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>> <users-unsubscribe@**wicket.apache.org<[email protected]>
>>> >
>>>
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail:
> users-unsubscribe@wicket.**apache.org<[email protected]>
> For additional commands, e-mail: [email protected]
>
>