af:commandLink does not prompt download File Dialog Not available

I am using following code for downloading pdf file
<*af:commandLink* text="#{row.docContentID}" id="cl31"
immediate="true" partialSubmit="true">
<af:fileDownloadActionListener contentType="application/pdf"
method="#{pageFlowScope.BulletinsBean.getDocument}"
filename="#{row.docContentID}.pdf"/>
</af:commandLink>
where i written code in getDocument() method of bean
where i have written file in outputstream which comes from input stream as follows:
InputStream stream = null;
int reportedSize = Integer.parseInt (response.getHeader ("Content-Length"));
//String contentsInHex = "";
//-------------------Write to browser---------------------
// Prepare.
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
HttpServletResponse responseHttp = (HttpServletResponse) externalContext.getResponse();
// Initialize response.
responseHttp.reset();
responseHttp.setContentType("application/x-pdf");
responseHttp.addHeader("Content-Disposition", "attachment ; filename="+contentId +".pdf");
responseHttp.setContentLength( reportedSize);
OutputStream output = responseHttp.getOutputStream();
try
stream = response.getResponseStream ();
buf= new byte[100];
int numRead;
while ( (numRead = stream.read(buf) ) >= 0) {
output.write(buf, 0, numRead);
facesContext.responseComplete();
output.close();
If i am using simple *<h:commandLink>* then it works fine but i am not able to get the text of that link to my action method . In this case i get all the table links text .
There are many links on the table.
But at the time of using af:commandlink i am not able to get the download dialog promp in firefox it gets directly downloaded and in case of IE8 it gives me bar upperside for getting download (This is blocked for security resons and when i click there is option for download)

ok Thank you but what about <h:commandLink>
When i Select on of the <h:commandlink> it gives me list of all commandlinks values in the table
Will you please guide me.I used following code for getting link i get selected
public String getPdfDocument()throws IOException {
String Value = null;
FacesContext facesContext = FacesContext.getCurrentInstance();
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{row.docContentID}", Object.class);
//System.out.println("Selected Value---"+valueExp.getValue(elContext));
if(valueExp.getValue(elContext) !=null) {
Value = valueExp.getValue(elContext).toString();
DCBindingContainer bindings =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter =
(DCIteratorBinding)bindings.findIteratorBinding("ListOfDocumentsIterator");
Row row=iter.getCurrentRow();
Value= row.getAttribute("docContentID").toString();//JSFUtils.resolveExpression("#{row.docContentID}").toString();
System.out.println("Selected Value is---"+Value);
return null;
}

Similar Messages

  • Why does Safari automatically download files?  I want option to download.

    Why does Safari automatically download files? I want option to download or not. I didn't think it used to automatically download. But now every time I click on a file that has been sent to me it does give me an option to view or not..it just automatically downloads it. Any suggestions?

    Hi,
    Why does Safari automatically download files?
    That's what Apple decided it should do. It's not my preferred option either to be honest.
    I didn't think it used to automatically download.
    Safari has always done this. Maybe in the past you had a third-party application installed that did this for Safari.
    Any suggestions?
    Safari menu > Report Bugs to Apple... or http://www.apple.com/feedback/macosx.html
    For more immediate action, have a search around www.macupdate.com or www.versiontracker.com to see if such an 'extension' exists to force Safari to prompt on download. (Bear in mind these kind of things can be sensitive to the version of Safari they're used with, so if Safari starts crashing down the line they would be the primary suspects to remove)

  • Where on my computer does Firefox put downloaded files?

    Where on my computer does Firefox put downloaded files? I need to use them.

    Hello Dan.
    This question can have many answers. If you selected, as you downloaded the file, a custom place to place the download, Firefox will have stored the file there (if the download was successfully completed). If you forgot where it was, you can go into Tools > Downloads, rightclick the file you want, and select "Open Containing Folder".
    If Firefox did not ask you where to save the file, you go into Tools > Options > General and select the location where Firefox will store your downloads. Here, you can also configure it to ask you every time you choose to save a download. As before, you can go into Tools > Downloads and ask for the containing folder.
    If you simply opened the download without asking Firefox to save it, it's possible that you can still access your file (if you did not close Firefox in the meantime). Files are are opened and not stored, are temporarily placed in a cache folder so you can use it while your Firefox session lasts. Simply go into Tools > Downloads, and, as before, ask for the containing folder. From there, you can copy/cut the file and paste it anywhere you want.

  • My half downloaded file is not shown in the list of downloads

    my half downloaded file is not seen the download box for further downloads but its half part is still in the folder of download.

    Is your portlet a mobile portlet ?
    if yes you can specify that it is not a "mobile only" portlet.

  • AIR Badge + RewriteRule fails - Downloaded file is not an air file

    Hi everyone!
    I'm not entirely sure my problem comes from RewriteRule but I've searched this forum for topics on corrupted AIR files and the Install Badge and tried almost every possible tip with no luck so I thought maybe my special issue comes from it...
    Here we go:
    I have a server-side script that builds AIR apps which are supposed to be installed (via an Install Badge). Those AIR apps are not stored at a public URL (for security reasons) but read (via PHP) when a specific URL is called. Let me give you an example (with fake paths) :
    The server-side built AIR app is store at /srv/data/air/myApp.air
    A RewriteRule redirects calls to http://www.my-server.com/air/999.air to http://www.my-server.com/air.php?id=999
    The air.php uses the GET id to read the AIR file :
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: private", false);
    header("Content-Type: $mimeType");
    header("Content-Disposition: attachment; filename=$name;" );
    header("Content-Length: ".filesize($path));
    readfile($path);
    With $mimeType="application/vnd.adobe.air-application-installer-package+zip" and $name="999.air"...
    When accessing the rewritten URL directly with a browser, everything is fine: the AIR file can be downloaded and installed as expected.
    But! When using an Install Badge linking to that URL, I get the nasty "The application could not be installed because the AIR file is damaged" message...
    And here's what's stored in .airappinstall.log:
    Starting app install of http://(...)/9889.air
    UI SWF load is complete
    UI initialized
    Downloading file to C:\Documents and Settings\Quentin\Local Settings\Temp\fla19D.tmp
    Received HTTP Response Status event
    Response URL is http://(...)/9889.air
    Downloaded file is not an air file.
    starting cleanup of temporary files
    application installer exiting
    Hum... And I'm stuck.
    Thoughts?
    I have multiple Install Badges in the same page, do you think this can break things?
    I've try adding the AddType instruction in a .htaccess file but it didn't change a thing...
    Thanks in advance!

    OK, I've got news.
    Bad news.
    In fact I realized the appurl set in the Install badge is (obviously) not called directly but by a script located at http://adobe.com/apollo... So your my session is not available in the script that is called and that reads the actual AIR file. So I can't check wether the user requiring the file has the right to. At least, not the way I intended to do it...
    I will keep you updated if I find something!

  • UCCX 8.0 CAD: Can you disable auto update? Error: "unable to download file" Could not open request.

    I have a UCCX 8.0 (2) Installed.
    Users here have limited access via proxy. Now everytime i try to run the CAD or CSD, i get the error:
    "unable to download file" Could not open request.
    It seems to want to install or check for an update.
    The work around i have found is to go to the CAD directory and change the update.exe filename
    C:\Program Files (x86)\Common Files\CAD\bin\update.exe
    i dont want to have to do this for every user as i possibly want the update.
    Is there a way to allow or bypass proxy on CAD?
    Regards
    J

    I had this problem before - to resolve it I disabled the proxy in internet explorer settings.
    You'll need to make sure the CAD version matches your UCCX server version. Otherwise you may run in to issues.
    Brian

  • Service stack update 2871777 to enable installation of RDP Connection Broker on 2012 domain controller - downloaded file will not execute.

    service stack update 2871777 to enable installation of RDP Connection Broker on 2012 domain controller - downloaded file will not execute.
    Downloaded x64 update for server 2012 R2 (KB2871777) -  file downloaded is named Windows8-RT-KB2871777-x64.msu
    When downloaded to server 2012 R2, upon launching the files, the message reads "Windows Update Standalone Installer"
    "The update is not applicable t your computer"
    If this is the wrong update please point me to the correct one - I cannot find another instance of this update anywhere.
    I am unable to remove the active directory from this server, so I need to use this fix if at all possible, in order to use RDP.
    I have tried every workaround I can find.  The goal is to have remote users access RDP to run a remote session and access apps and files
    on the server.  we have Hyper-V enabled and have successfully deployed 10 RDP licenses to the license server) also on the PDC.
    I read one post that suggested installing RD Connection Broker in one instance of a VM and AD DS in the other - not sure if that means we remove
    AD DS from physical server.  We only have one 2012 server (plus a server 2008 with Ad DS) and  a server 2003.  Trying to make this all work so we can deploy 10 remote desktop users.

    KB2871777 appears to be for 2012 (non R2) only.
     As to the other problem maybe this one helps.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/bbf47aa2-8ae5-4f22-9827-afee5a11417a/install-remote-desktop-services-failed-on-windows-2012-server?forum=winserverTS
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Could not open the file. Not enough memory

    I have always used fireworks cs4 normally, but today, i experienced a bit of trouble. there is one png file that when i click to open it the fireworks loads but then a message pops up (could not open the file. Not enough memory) after a bit of researching, i found out that this error happens when i bring to stage one of the common libraries menu bars. (menu bar 4). Does anyone know how to fix this?
    ps: I am able to open this file via file-open-*png. Please i really need help. Is the library corrupted maybe?

    Hi,
    It opened on mine (1.2Gb). I don't think it's a memory issue. I've used FWCS4 with 512mb RAM, never had such a problem. (of course it was very slow at the start, and i used to leave for a cup of coffee first and then come back when it was ready for work. That's why i upgraded to 1.2G .)
    Import this menu bar from the common library, save it again as a png and then open it with fireworks the way you did, to see if the same error occurs.
    Has this happened with other files as well?

  • Libreoffice in KDE does not use KDE file dialogs

    Hello,
    I have libreoffice-4.2.4-1 from [extra] installed, together with libreoffice-kde4 4.2.4-1. But it still shows the GTK file open/save dialog instead of the KDE one.
    I tried starting libreoffice with the following command that I got from the wiki:
    SAL_USE_VCLPLUGIN=kde4 lowriter
    But that does not change anything. I guess, the autodetection of libreoffice works well, and it is already using the QT style even without the SAL_USE_VCLPLUGIN variable set. It is just not using the right file dialogs. There is a setting libreoffice options (Tools--> Options --> General --> Use Libreoffice dialogs), but it is unchecked.
    I checked the forums about this, but the only thing I could find were some threads about a bug with Libreoffice crashing on start. I experienced that bug too, and it seems to be gone now. Unfortunately, I find the missing KDE file dialogs even more annoying.

    For me OOO_FORCE_DESKTOP=kde4 does not solve the problem either.
    About arojas' link: Do I understand this correctly, that they disabled the KDE file dialog because it is possible that the application crashes in certain conditions due to some QT component? And they hardcoded that, so you cannot reactivate it using some option?

  • Download folder does not display downloaded files; nor ask destination

    When I download a file, the Download folder opens but does not display the downloaded file. If I set the option to Ask for destination, it doesn't ask, just opens the Download folder with nothing displayed. This is happening on two machine.
    Thanks for the help.

    If you want to keep a file that is opened in an external program then you either need to save it in the program if it permits or use "Save Link As" in the right-click to save the file. Files opened in an external program are never guaranteed to stay in the location, so editing a text file of other file that is opened in a program and save it under the same name will likely cause you to lose this edit.

  • Firefox 16.0.2 does not actually download files to my computer (Mac running OSX 10.8.2) - not to downloads or any other specificied location.

    When I try to download a file, everything at first appears to function properly. I get the option to specfic the download location, for example. It does not matter if I accept the default location (downloads), or if I specify a custom location (for example, my Desktop). Once I initiate the download there is a brief animated sequence showing a file icon going somewhere. Once that's done, however, I find there has been no download accomplished. The file is not in the specfied location, and a searching the computer does not show that it went anywhere else either. I have no difficulties downloading files with Safari. I would prefer to use Firefox.

    same issue with same system specs. Google Chrome and Safari download the files just fine. Firefox used to dowmload files fine.

  • "Download Files"procedure not working in duplicate app/shows page not found

    Hello,
    I have created an application using the "Download files" procedure described in "How to Upload and Download Files in an Application" chapter of the APEX "Advanced Tutorials." It works just fine on the one server, however, when I exported the application and data from the working copy and imported it in APEX running from my laptop, I could upload files and generate a report with a link to click and download the files again but when I clicked on those links, I would get a "Page Not Found" error. It looks like it might not be going to the procedure and instead goes to a page like the following: "http://127.0.0.1:8080/apex/DBAPORTAL.download_image?p_id=1868612316946460." On the working copy on the other server, when the download link is clicked, you will get a dialog box asking if you would like to open or save the file.
    Could anybody tell me why the procedure is not being called and goes to a non existent url while the origonal application works just fine on the other server?
    I have granted APEX_PUBLIC_USER execute permissions to the procedure. I am wondering if there are any other permissions that I should be granting. Should I grant PUBLIC or ANONOMUSE permissions to use the "download_image" procedure?
    I have forgotten to mention that on my laptop I am using database 11.1 and on the server I believe the database is 10g.
    Hope to get an answer to this issue. I've asked a couple people already and they are stumped.
    Thank you in advance.
    Linda

    Scott,
    I have tried to follow the instructions commented out "RETURN FALSE;" and added procedure 'DOWNLOAD_IMAGE' to wwv_flow_epg_include_local.sql. But I'm confused. Should I be changing file "wwv_flow_epg_include_local.sql' or 'wwv_flow_epg_include_mod_local" package?
    When I run "ALTER SESSION SET DBAPORTAL FLOWS_030100;" in sqlplus, how do I know what FLOWS_XXX I have? Is it FLOWS_030100 or FLOWS_030000? I have database 11.1 installed. What version of APEX do I have with this database? How do I find out?
    Do I need to be in a perticular directory before I run the alter script? If so what folder?
    How do I "Compile the function wwv_flow_epg_include_local.sql.?"
    Needless to say, when I added the procedure to the file, and when I tried to alter it, I got the following error:
    SQL> ALTER SESSION SET DBAPORTAL FLOWS_030100;
    ALTER SESSION SET DBAPORTAL FLOWS_030100
    ERROR at line 1:
    ORA-02248: invalid option for ALTER SESSION
    Please tell me what I am doing wrong.
    Thanks
    Linda

  • When Firefox is opened a download file dialog box pops up

    When I open Firefox, a download file prompt appears for a file that I previously downloaded. I'm using Windows 8 x64 on a brand new laptop. (Not the computer I'm posting from)
    I've tried the following:
    Set Firefox to use the default homepage. There are no secondary pages.
    Set the default homepage back to default. (The default homepage does come up)
    Tried launching Firefox directly from c:\program files (x86)\mozilla\Firefox.
    Clearing the downloads list.
    Deleting all files in the Downloads folder.
    Searching the HKLM\software\mozilla registry key for the filename.
    Searching the about:config section for the filename.
    Deleting the app data folder from app data\local.

    Try clearing the Download History.
    https://support.mozilla.org/en-US/kb/remove-recent-browsing-search-and-download-history

  • Error message not displayed - Downloading files in a table

    Hi!!!
    I'm following the guide to download files onDemand in a table, you can find that guide at:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f
    If found a problem with the guide: What would happen if there's an error while downloading or somenthing else? There the author doesn't explain how to show an error in the view.
    What I'd like to do is to show a error message in the view where the table is.
    I tried to add some code, but it doesn't finally show the error message.
    I have a method that generates the file and returns the path of the file in the context, so I can read it. It return boolean (true if the file was generated, false on the contray). That method is called executeZgav_Sf_Formulario_Sv_Input(nroEmpleado, nroViaje, morei, datosEspejo); and is working fine.
    I also have a static class that reads a file and returns the byte[] called: ManejoArchivos.getByteArrayFromResourcePath(wdContext.currentOutput_FormularioSVElement().getP_Path(), true);
    But if for example, the parameters are incorrect and the file cannot be generated, the method is supposed to show an error but is not displayed on the screen.
    I have some code after that which validates if the file could be read or not and returns the bytes of a prewritten PDF file with an error message.
    Added code:
              byte[] r = null;
              boolean continuar =
                   this.executeZgav_Sf_Formulario_Sv_Input(nroEmpleado, nroViaje, morei, datosEspejo);
              if (continuar)
                   try {
                        r =
                             ManejoArchivos.getByteArrayFromResourcePath(
                                  wdContext.currentOutput_FormularioSVElement().getP_Path(),
                                  true);
                   } catch (FileNotFoundException e) {
                        wdComponentAPI.getMessageManager().reportMessage(
                             IMessageData.ARCHIVO_NO_ENCONTRADO,
                             null,
                             true);
                   } catch (IOException e) {
                        wdComponentAPI.getMessageManager().reportMessage(IMessageData.PROBLEMA_IO, null, true);

    Hi Alejandro,
    Try This.
    try
    catch (FileNotFoundException e) {
    wdComponentAPI.getMessageManager().reportException("Given FileNotFoundException : "+e.getMessage(),true);
    catch (IOException ex) {
    wdComponentAPI.getMessageManager().reportException("Given IOException : "+ex.getMessage(),true);
    Re: How to display which exception Is Raised?
    Regards,
    Mithu

  • File Dialog not appearing in web form after Note:74140.1

    Hello, I have implemented the source given in Note:74140.1 to replace the get_file_name function that displays the file dialog box. However I still am not able to see the dialog that the JavaBean should display. I am relativly new at linking JavaBeans with forms, so there might be something that I am missing.
    I have created the class files for FDialog and FDialogPJC and put them in an ear file. I have also modified the fiels server.xml and default-web-site.xml to include the ear file. The respective code for a button has been added to the button trigger in the form, as well as the code for the JavaBean.
    So far this has been unsuccessful. If you have a suggestion, your help is much appreciated.
    Justin.

    the problem is that when I type JDialogPJC in the implementation class property of the java bean when working in JDeveloper, it cannot locate the java class file JDialogPJC.class. This happens when I put both the JDialogPJC and JDialog classes in the jar file and put the jar file in the forms90/java directory.
    However, if I just put both class files (not contained in a jar file) in the forms90/java directory, and I specify the JDialogPJC in the implementation class property of the java bean, it works fine.
    I would like to be able to use the jar file instead of a whole load of class files sitting in the directory.

Maybe you are looking for

  • Gmail crashes Safari and FireFox in Mac OSX 10.9.2

    I'm getting a  crash with both Safari and Firefox. As soon as I try to open up any email in gmail using the standard interface it crashes.  If I use the HTML interface there is no crash but I'm also missing gmail features.   Firefox about:crashes sho

  • Output an HTML file as a printable document

    Hi, in my application, I generate and display an html file which is supposed to be printed as a single document. I don't want the page number, date, link, title to be shown on the print out. how do I control them not to be shown? as an example, appli

  • Is the MBA the answer?

    Hi, I've been searching through the forum to answer my questions, and have gleaned a few tips. I'm looking to get a new laptop for a specific purpose and wondered if anyone else has used it for the reasons below, and would it be a good solution for m

  • Printing Individual Production Order Labels

    Good afternoon, I was wondering if anyone could point me in the direction of how I can printer individual production order labels. For example, I have a production order that I am able to scan, to generate barcode labels for all of the parts in the o

  • Recommendations for best disk recovery software

    I'm reading up on various reviews on disk recovery software, but just wanted to get some of your opinions and recommendations. I use to use Nortons back in the old days of System 7 and beige G3s but haven't need to use such software until now, so i'm