outputLink open document problem
[Logo]
Forums for ICEfaces and ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
outputLink open document problem  XML
Forum Index -> Components
Author Message
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).
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.
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

[Email]
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 [Disk] Download
 Description
 Filesize 15256 Kbytes
 Downloaded:  197 time(s)

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

[Email]
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 ?

ppronzola

Joined: 25/02/2008 00:00:00
Messages: 29
Offline


try opening the link in a target hidden iframe
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
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team