| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 15/12/2006 06:44:01
|
keny
Joined: 30/11/2006 00:00:00
Messages: 20
Offline
|
Hi,
My application needs to allow users to download dinamicly created files. I've implemented this functionality by providing outputLink component with rul pointing to these files. However, in Mozilla, when I click on the created link the download dialog pops up and I can save file on my local disk. But, when I close the download dialog and try to execute some other action(button or link), the application stops responding. The connection status component shows that connection is lost. So in order for the application to continue working I need to refresh page. On the other hand I'm no expiriencing such problems with Internet Explorer(connection stays active/live).
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 18/12/2006 03:05:17
|
keny
Joined: 30/11/2006 00:00:00
Messages: 20
Offline
|
Hi,
I've forgot to mention that I've managed to force it to work by setting synchronousUpdate parametar to true
Code:
<context-param>
param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>true</param-value>
</context-param>
, but then some other components (inputFile with progressBar) stop working.
Is it an issue of Mozilla or it has to the with icefaces. Is there any way I can make them both work in same time under mozilla. In Internet Explorer everything works fine when synchronousUpdate parametar is set to false.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 19/12/2006 12:46:22
|
rmayhew

Joined: 11/04/2006 00:00:00
Messages: 100
Offline
|
Setting the target to _blank will open the download in a new window, and keep the AJAX connection open to the server.
Code:
<ice:outputLink target="_blank" value="http://download.url">Download
</ice:outputLink>
|
Rob Mayhew
http://snappy.sensemaker.net
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 20/12/2006 02:10:09
|
keny
Joined: 30/11/2006 00:00:00
Messages: 20
Offline
|
@rmayhew
I've tried your suggestion, but the connection was being lost again. Here is the sample code that can be used to replicate the error I'm getting. Try it out in Mozilla (folow the instrunctions from my previous posts).
| Filename |
outputLinkExample.zip |
Download
|
| Description |
|
| Filesize |
15256 Kbytes
|
| Downloaded: |
197 time(s) |
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 20/12/2006 10:49:07
|
rmayhew

Joined: 11/04/2006 00:00:00
Messages: 100
Offline
|
Hi,
Thanks for the example. I added target="_blank" to the link. This causes the download to happen in a new window, and will not break the connection. FF2 close the window, Mozilla keeps it open, IE6 will also close the window.
The reason it's important to open a new window is clicking a download link in the existing window will break the Java Script connection link (As you have noticed)
Code:
<f:view xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<html>
<head>
<title>Svarog</title>
<link href="css/xp/xp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<ice:panelGrid border="0" cellpadding="0" cellspacing="0" width="100%" >
<ice:panelGrid styleClass="navConnectionStatus" columnClasses="statusLeft, statusRight" columns="2">
<ice:outputConnectionStatus />
</ice:panelGrid>
<ice:panelGrid>
<ice:outputLink value="scripts/xml.zip" target="_blank">Download</ice:outputLink>
</ice:panelGrid>
</ice:panelGrid>
</body>
</html>
</f:view>
|
Rob Mayhew
http://snappy.sensemaker.net
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 31/07/2008 22:45:27
|
mchin
Joined: 11/04/2008 00:00:00
Messages: 9
Offline
|
Hi,
I have added target="_blank" to my outputLink, but
I am having the same problem where my icefaces components are unresponsive after the download of a text file.
All other non-icefaces components are responsive.
Also, the Icefaces components become responsive again after hitting the refresh button.
Any ideas how I can fix this issue ?
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 01/08/2008 14:14:40
|
ppronzola
Joined: 25/02/2008 00:00:00
Messages: 29
Offline
|
try opening the link in a target hidden iframe
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 13/01/2009 23:12:58
|
glenn.molnar
Joined: 06/11/2008 00:00:00
Messages: 14
Offline
|
What was the solution for this? I am facing a similar problem at the moment, though I am not trying to download a file - I'm just trying to have a link that opens in another window, but the original window becomes unresponsive.
Thanks
|
|
|
 |
|
|