You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by cordenier christophe <ch...@gmail.com> on 2009/12/15 14:11:14 UTC

T5 : Zone / Tapestry.windowUnloaded / Download link

Hi All

When i have a dowload link in my page (generated via EventLink), and zones
in the same page. If the download link is clicked, it raises a
window.beforeunload event (because of GET). After that the zone do not
update anymore, since tapestry.js is listening to 'window.beforeunload' to
disable Ajax Request in Zone component.

So the only workaround i see here is to open a download window via
Javascript.

But i would prefer to use the 'Content-Disposition: attachment' Header and
keep the zone component running, any advice ?

Regards,
Christophe.

Re: T5 : Zone / Tapestry.windowUnloaded / Download link

Posted by raulmt <ra...@gmail.com>.
There is an issue on jira about this problem:
https://issues.apache.org/jira/browse/TAP5-1115

Maybe you should vote for it ;)

The workaround I used was also target="_blank". But if you us
Content-disposition: attachment it will open a new tab/window but the
browser will close it just before showing the download file dialog, so it is
just like a "blink"…

Regards,
Raul.
-- 
View this message in context: http://tapestry-users.832.n2.nabble.com/T5-Zone-Tapestry-windowUnloaded-Download-link-tp4169833p6053565.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 : Zone / Tapestry.windowUnloaded / Download link

Posted by Magnus Kvalheim <ma...@kvalheim.dk>.
Yes, we've experienced same problem and resorted to use target="_blank" as
we didn't have the time to come up with something more creative.

A better solution would be welcomed though :)

On Thu, Feb 17, 2011 at 3:05 PM, Richard Kolísek
<ri...@gmail.com>wrote:

>
> same problem here
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-Zone-Tapestry-windowUnloaded-Download-link-tp2436863p3389487.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T5 : Zone / Tapestry.windowUnloaded / Download link

Posted by Richard Kolísek <ri...@gmail.com>.
same problem here
-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Zone-Tapestry-windowUnloaded-Download-link-tp2436863p3389487.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 : Zone / Tapestry.windowUnloaded / Download link

Posted by cordenier christophe <ch...@gmail.com>.
Hi all,

I insist on this point, but has anyone encounter this problem ? To be clear,
it means that you can use a zone in a page that contains a download link
without this annoying side effect. Does really the Ajax Request need to be
disabled on window unload ? Shouldn't it be a parameter ?

Regards,
Christophe.

2009/12/15 cordenier christophe <ch...@gmail.com>

> Hi All
>
> When i have a dowload link in my page (generated via EventLink), and zones
> in the same page. If the download link is clicked, it raises a
> window.beforeunload event (because of GET). After that the zone do not
> update anymore, since tapestry.js is listening to 'window.beforeunload' to
> disable Ajax Request in Zone component.
>
> So the only workaround i see here is to open a download window via
> Javascript.
>
> But i would prefer to use the 'Content-Disposition: attachment' Header and
> keep the zone component running, any advice ?
>
> Regards,
> Christophe.
>