Hi Martin,

do you mean using the popupsettings or directly some window.open js underneath?

With following code a completely new page would open, I would prefer open a new 
tab.
PopupSettings popupSettings = new PopupSettings();
popupSettings.setTarget("_blank");
resourceLink.setPopupSettings(popupSettings);
Thanks, Chris

> Am 03.05.2015 um 21:47 schrieb Martin Grigorov <[email protected]>:
> 
> You should use window.open() instead.
> See org.apache.wicket.markup.html.link.Link#setPopupSettings
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Sun, May 3, 2015 at 10:44 PM, Chris <[email protected]> wrote:
> 
>> Hi Martin,
>> 
>> thanks - if the click is on a DIV element instead of a link, how can I add
>> to the response a JS that the response should be opened in a new window?
>> 
>> Chris
>> 
>>> Am 03.05.2015 um 21:15 schrieb Martin Grigorov <[email protected]>:
>>> 
>>> Hi,
>>> 
>>> Add target="_blank" in the HTML.
>>> In Java make sure you use ContentDisposition=INLINE.
>>> 
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>> 
>>> On Sun, May 3, 2015 at 2:42 PM, Chris <[email protected]> wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> How is it possible to add a tag target=_blank to a resource link
>> serving a
>>>> pdf so that a click on this resource link opens a new browser window?
>>>> Following code does not work:l ink.add(new AttributeAppender("onclick",
>>>> new Model("alert('This is my JS script');"), ";"));
>>>> 
>>>> Thanks Chris
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 

Reply via email to