Download a file after the end of a Thread

Hi everyone,
I post here because I have a problem with a part of my application in ADF.
In my page I have a button witch create a Thread ans in this Thread I create a file. I checked if the Thread is alive or not with a poll and a progressIndicator.
When the Thread end I want to show a download pop up to download the file witch is create by the Thread. But nothing appends. A friends tell me to create a button, put the download code in the action and fire the button with code. But I have the same result.
If I click on the button everything is fine but with the code nothing appends.
this is the method I use to check if the Thread is alive :
public boolean isCreateReportRunning(){
if(createReportThread == null){
poll.setTimeout(60000);
return false;
if(!createReportThread.isAlive()){
try {
System.out.println("CreateReportThread is not alive - Thread is free");
createReportThread = null;
poll.setTimeout(0);
refreshCurrentPage();
//Fire the button with code
new ActionEvent(hiddenButton).queue();
} catch (Exception e) {
e.printStackTrace();
return false;
return true;
In the action I simply show the pop-up to download the file
This is for the hidden button in my jspx page :
<af:commandButton text="Download" id="cb1"
binding="#{reportV2Bean.hiddenButton}"
action="#{reportV2Bean.hiddenButtonClick}"
immediate="true" partialSubmit="true">
</af:commandButton>
I also try with a <af:fileDownloadActionListener> but the problem also occurred
Thank you for your help.
Lish
Edited by: Lish on May 9, 2011 4:58 AM

Noboby has an idea about my problem ?

Similar Messages

  • Will the MacBook Pro w/retina display continue to download a file after the screensaver comes on?

    does the Mac book Pro w/ retina continue to download a file after the screensaver comes on?

    Hi scootsmama,
    Network connections should still continue if the computer has only gone to the screensaver or display sleep. On a portable machine, when the machine goes to sleep it closes the network connection. You may find the following article helpful:
    What happens when the Mac goes to sleep (not just into idle mode or display sleep)?
    On all Macs:
    The microprocessor goes into a low-power mode
    Video output is turned off, and a connected display may turn off or enter its own idle state
    Apple-supplied hard disks spin down; third-party hard disks may spin down
    On portable Macs:
    The Ethernet port turns off, if applicable (see note below)
    Expansion card slots turn off
    The built-in modem, if present, turns off (see note below)
    An AirPort card, if present, turns off (see note below)
    The USB ports only responds to the power key on an external keyboard (see below)
    The optical media drive, if present, spins down
    Audio input and output turns off
    Keyboard illumination, if a feature of your portable computer, turns off
    A computer uses considerably less power when in sleep mode than when awake. The computer will continue to power RAM in sleep mode, so that whatever was in RAM when the computer went to sleep will still be there when the computer wakes. This also means that computers with more RAM use slightly more power in sleep mode.
    Note: Portable computers have no network connectivity when in sleep mode, but can wake if the Energy Saver option "Wake for network access" is enabled. If you wish to use file sharing or don't want to interrupt your Internet connection, you should not manually put the computer to sleep, and you should drag the "Computer sleep" slider to Never.
    Apple Support: About Energy Saver sleep and idle modes in Mac OS X
    http://support.apple.com/kb/ht2412
    Regards,
    - Brenden

  • What happens to my files on creative cloud folder after the end of my subscription?

    What happens to my files on creative cloud folder after the end of my subscription?

    Creative Cloud Help | Creative Cloud / Common Questions
    "What happens to my files in the cloud if I cancel or downgrade my membership?
    Your Creative Cloud files are stored on your desktop as well as on the Creative Cloud servers. If you cancel or downgrade your paid membership, you will still have access to all of the files in the Creative Cloud folder on your computer and via the Creative Cloud website.
    Your account will be downgraded to a free membership, which includes 2GB of storage. If you’re using more than 2GB of storage, you will not be able to upload any new files to the cloud until the amount of online space used in your account drops below your allotted amount.
    If you are over your storage limit, you have 90 days to reduce your online usage or you may lose access to some or all of your files saved on the Creative Cloud servers."

  • If I am using a website which opens a pop up window or am downloading a file and the popup downloads window appears, it will minimize itself to the taskbar after a few seconds or if I move the mouse pointer out of the pop up window.

    Occurs every time I use the squeezenetwork.com website to control my squeezebox boom internet radio player. (logitech) Also occurs every time I download a file and the downloads window pops up. The pop up window minimizes to the taskbar, or the browser window is on top of the pop up window.

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • I clicked the download all button at the end of the list of my library iTunes which i believe is in the iCloud, i have iTunes match also, many downloads were reported as occurring over several hours and then received the warning startup dis

    i clicked the download all button at the end of the list of my library iTunes which i believe is in the iCloud, i have iTunes match also, many downloads were reported as occurring over several hours and then received the warning startup disc is full (activity monitor shows 3.99 of 4 GB used) and then another stating the download had not occurred due to the disc being full. most of the tunes still appear to be in the cloud but the disc is said to be full, spent a good period of time trying to investigate what has happened but failed...I'm not well up on all of this as an old chap so any help would be wonderful.....

    unclefossil wrote:
    Thanks Michael, what is the best way of backing up, should buy a cheap standalone external hard drive rather than relying on the Time Capsule which is quite sensitive...
    If you read the link I provided you'll get an idea of one way to maintain a backup of your music files, use Time Machine, and not take up as much room on the internal HDD/SSD.
    unclefossil wrote:
    i live in the Scottish Highlands where Broadband is frequently intermittent disrupting backups.
    Your internet connection speed has no effect on Time Machine/Time Capsule backups. Since that is all done locally, over your wireless network you actually do not need an internet connection at all.
    unclefossil wrote:
    Also I wondered if I could increase the memory on the setup disk by replacing the 4GB card already in the MBP with 16GB cards, if I upgraded would that affect anything I have stored already like my iTunes?
    You're asking about the computer's RAM. Increasing that will not increase the size of the internal storage available to the computer. You'd need to replace the HDD/SSD of the Mac, which, depending on what model you have may or may not be possible (with new models of Macs).

  • Download a file from the web

    Helo,
    I have to download a file from the web and copy it to the file system (ex: download from http://172.26.20.22/test.csv to \\server01\teste.csv).
    I must do this using only pl/sql and java sources, I have to do this calling a procedure from pl/sql and the server doesn't have any component installed.
    I've built a java procedure using java to download the file, but it give-me AccessControlException when trying to download.
    Can anyone tel me what permissions I should have to accomplish this? Is there any other easier way?
    Thanks.

    Thanks a lot! Your post was very helpfull.
    I create a procedure do download the file from the web and record in a network share.
    But I'm still having a problem while writing that each line in my source file generate a duplicate line in my destination one.
    Can you help me with that problem to?
    Thanks
    My procedure is below:
    create or replace procedure SP_DOWNLOAD(astr_url_orig varchar2, astr_cam_dest varchar2, astr_nome_arq_dest varchar2) is
    l_pagina utl_http.html_pieces;
    l_arquivo utl_file.file_type;
    begin
    l_pagina := utl_http.request_pieces(astr_url_orig);
    l_arquivo := utl_file.fopen(astr_cam_dest, astr_nome_arq_dest, 'W');
    for i in 1 .. l_pagina.count
    loop
    utl_file.put_nchar(l_arquivo, l_pagina(i));
    dbms_output.put_line(l_pagina(i));
    end loop;
    utl_file.fclose(l_arquivo);
    end SP_DOWNLOAD;

  • Problem Downloading a File To The User's PC

    My application is based on the 10.1.2 app server and Oracle Portlets.
    I need to download a file to the user's PC. When the file gets sent to the user I need to have a dialog box open up that asks the user where they want to save the file.
    What I did was to set the Content-Disposition equal to
    "attachment; filename=C:\exportFile.txt"
    and the Content-Type equal to "application/x-download"
    When I do this I receive the error:
    ERROR: Failed to handle HTTP Request
    java.io.UnsupportedEncodingException: Media Type of a TextResponseWrapper must start with "text/"
    Has anyone successfully done this in the Portal environment before? Any ideas on a possible solution?
    Thanks

    Try using:
    tell application "Finder"
    set path_2 to quoted form of POSIX path of (folder of (path to me) as alias)
    end tell
    tell application "System Events"
    do shell script "curl 'ftp://user:password@server//www/htdocs/current/l.txt' -o " & path_2 & "l.txt"
    end tell
    (41158)

  • HT1750 unable to download pdf files with the new lion instillation

    I am unable to download pdf files after installing lion.

    I have an imac purchased 4/2010 and same thing happened to me but can't find anyone to address it. The real tragedy here is that I paid for the full adobe creative suite, web premium back in 2010 and Adobe Pro can't open them, although it worked just fine before. Then I installed the latest version of Adobe reader and tried changing that to my default and that doesn't work either.
    It's pretty lame that I have to go on my boyfriends windows pc to open and print a .pdf as the only alternative. I did not read about this when researching whether or not to upgrade to lion from snow leopard otherwise I would not have kept the old operating system.
    Why isn't apple addressing this???

  • Issues opening downloaded docx files from the internet on my mac air...

    I have owned my Mac Air for nearly 1.5 yrs and never had an issue, until yestrday.
    I can download docx files from the internet no problem, but when I go to open them (after they have saved into my downloads folder) a pop-up window with "convert file from" appears? Alas I can not open any downloaded docx files from the internet/email etc! This is making work very difficult.
    Any suggestions would be greatly appreciated!

    that explains a lot, you didnt mention that critical part before.  I upload a lot to FTP sites as well
    originals fine.... but thru the server theyre corrupted, .....that narrows everything down.
    have you contacted sys admin for the server about this?
    see here:
    http://stackoverflow.com/questions/2477564/why-are-docx-files-being-corrupted-wh en-downloading-from-an-asp-net-page

  • How to download a file from the net and save it into .txt format in a datab

    Can some one show me a tutorial on how to download a file from the net and save it into .txt format in a database?
    Thank you,

    http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html

  • How to download a file from the internet using terminal

    how to download a file from the internet using terminal
    does any one know how to download afile from the internet using the Terminal application?

    Use curl. Something like this:
    curl -O http://www.example.com/filename.zip
    For more info, type +man curl+.

  • When i try download a file from the internet it looks like its downloading then when i go to open this file it opens up in the app text edit and says it cannot open i DOS mode? Can anyne help?

    when i try to download a file from the internet it starts to download but when its finished it opens up in the app "text edit" and it says this file cannot open in DOS mode.
    Can anyone help?

    It sounds like perhaps the file doesn't have an extension that the system recognizes. Is this all files, or just one specific one, and if so, which? What is the name (and extension, if it has one) of the downloaded file? What kind of file do you *expect* it to be? (PDF, or whatever). Renaming a file with the appropriate extension can often fix that kind of problem.
    Matt

  • I download a file in the torrent site which is MP4 but unfortunately i tried to delete it but i can not. but all the files that i have is easily to delete only MP4 files i can't delete in the download foldeer please try to help dont know what to do please

    i download a file in the torrent site which is MP4 but unfortunately i tried to delete it but i can not. but all the files that i have is easily to delete only MP4 files i can't delete in the download foldeer please try to help dont know what to do please

    Well you can sync your iPod/iPhone to yur computer or laptop then take the photos off of your iPod like taking photos of of a SD card (from a normal camera) or off of a USB..! Good Luck. plz tick this saying This solved my question if it helps you.

  • How can I download a file over the internet from a WebDAV server?

    I am trying to download a file over the internet from a WebDAV server. I've tried doing it with Datasocket as suggested in these articles,
    <a href="http://digital.ni.com/public.nsf/websearch/f3cc5f7e60a75cb2862567e700696abf?opendocument">Retrieving an Unformatted Text File via FTP or HTTP Using DataSocket</a>
    <a href="http://digital.ni.com/public.nsf/websearch/4FA09E7B3674DA34C1256BD400555C41?OpenDocument">Download a Text File from a Password Protected URL Using DataSocket</a>
    but all I get is error 1181 (protocol unrecognized by Datasocket).
    I know I have the URL correct, because I can put it into a web browser and it works fine - I can download the file manually.
    But I want to have a LabVIEW program do the download automatically.
    I have the internet toolkit, but don't have the foggiest clue how to use it, and am using LabVIEW 7.1
    I am a bit out of my depth here, so any advice welcome.
    Regards,
    Mark.

    MIG,
    What is the URL to the website? Is it an FTP site? The articles you referenced are for specific transfer protocols. If the stie you're trying to get to doesn't follow these protocols, then you'll get the error you're seeing. You may have to use ActiveX to control IE and download the files programmatically.
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • How do i transfer a compilation photo file from iPhoto consisting of canon(img) and lumix(p..) in the order i compiled them to a usb stick as at the moment it is putting all the lumix files after the canon files?

    I have a macbook pro 15 inch retina 16 gb 1600mhz 2.7intel i7 osx 10.8.5
    I have just put together an iPhoto file of wedding photos consisting of a compilation of images from my canon(img files) and lumix(p..files) I want to know how to transfer them to a usb stick in the order i compiled them as at the moment it is putting all the lumix files after the canon files which is not how i want to present them to the newlyweds?

    Files are ordered by the file-viewer being used.  What viewer are you using, and what data field are you sorting by?
    In Finder, as in most applications, you can select the data field to sort by clicking a column header.  Clicking the selected header will reverse the sort.
    This is the Aperture forum, but what applies to Aperture is likely also true for iPhoto:  if you want to be able to sort your files in a specific order in a file-viewer, you should give them names that allow for sorting in that order when the name field is selected as the data field to sort by.  In Aperture, one creates new files by exporting, and one uses a File Naming Preset to name the files.  The File Naming Preset can start with an ordinal count or a sequence number.  Either of which will allow you to retain your order when viewing your files in a file viewer.

Maybe you are looking for