How to enforce save/open dialog on fileDownload

Dear All,
in my adf bc app., an item is set to be displayed as fileDownload of OrdDocDomain to show a download link to the file stored in a orddoc column in a table. for doc file type, browser will prompt the dialog to ask to save or open, while for pdf or txt file, it just opens
the file in the new browser tab. i know it depends on the behavior of browsers, my wonder is, is there a workaround to enforce the dialog(save/open) to all types of files? thanks.
regards
Jerry

Hi...
Usually in J2ee if you have a handle to response object...
You can add a header called Content-Disposition as attachment...
response.addHeader("Content-Disposition", "attachement; filename=\"" + fileName + "\"")
By default Content-Disposition header will be "inline"..ie why the files are getting displayed in the page itself ( Given the format is supported by browser).
If you set it as attachment then the file download popup will come..
Hope you will be able to use this...
Thanks..
Abhilash

Similar Messages

  • How to force SAVE/OPEN dialog box to appear in IE? (save output locally)

    Hi all!
    I currently have various reports in Excel format outputted in cache via the iAS browser.
    Is there a way to programatically force a SAVE/OPEN BOX to appear in IE whenever my output is spreadsheet/excel? The prompt box appears on Firefox and Opera but not in IE, i take it that IE has already been 'configured' to open excel spreadsheet automatically in the browser.
    Another spin to the question is: How do end users save the Reports output directly to their local machine; instead of having it opened in the browser or saving it in the midtier server

    I found a backdoor solution to this:
    at the URL link, i added &mimetype=application, this will force IE to show the save dialog box because it does not know what the application type is.

  • Save/Open dialog crashes on opening a folder which contains multiple app. alias

    Hi:
    This is my first post in Apple forum, I've been searching some pages here, obviously I'm not the only one having this (or similar) problem but all existing threads are suggesting "Safe Mode" or "Disk Util" these useless things and never worked for me.
    I believe this is a bug from os x / Finder, not sure if this has been filed or not against Apple bug db.
    The problem:
    Save/Open dialog hangs up when loading / opening an existing folder which contains multiple application alias
    How to reproduce:
    1) Use any browser (I use Firefox and Chrome) to open a page and  print the page / or download something, or print something as PDF
    2) When Save dialog ( some people call it file picker or location selector, whatever) pops up, select a folder which contains multiple application alias
    3) Dialog hangs up, and the application icon on those  alias will not be loaded successfully. Need to Force Quit the browser.
    4) Issue cannot be reproduced always, but frequently enough if you have many application alias and files / subfolders in the target folder
    5) By removing all the application alias, can workaround the issue.
    6) The icons of application on those alias are loaded slowly in a successful loading (seems there are some performance issues)
    7) This issue has not been observed before upgrading to Mavericks
    Env:
    27 inch iMac Late 2012, 2.9GHz i5, 8G DDR3, NVIDIA GTX660M 512M, OS X 10.9.1
    Please anybody (not sure if Apple monitors this community) who knows details in regards to this, share some info. (or maybe there already is a fix ? ) .
    Thanks.
    Regards,
    Lyle.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • How to suppress Save As dialog when using the Close button on an editable pdf

    Environment: Windows 7, SDK 9, Adobe Acrobat Pro X, Visual Studio 2010 Professional
    Summary: when a document is opened for editing using automation, edited, then closed using the "Close" button, the confirmation dialog appears, "yes" is selected and then the "Save As" dialog appears.  It should save without the "Save As" dialog in the same way it does were the document opened from Adobe Acrobat directly.  My question is, is there any flag to set which governs whether the "Save As" dialog appears as part of the close document process.  It is behaving as if the document is read-only upon close. (it isn't)
    This is how the document is opened from C++:
    if(SUCCEEDED(hr = ::CoCreateInstance(__uuidof(Adobe9::Acrobat::CAcroAVDoc), 0, CLSCTX_ALL, IID_IUnknown, (void**)&pUnk))){
    hr = OleRun(pUnk);
    if (SUCCEEDED(hr)){
    if (SUCCEEDED(hr = pUnk->QueryInterface(&pAVDoc))){
    hr = pAVDoc->Open((BSTR)CComBSTR(strPath), strDocName, &bRet);
    Even when the plugin is removed from the plug_ins\AcrobatSDK directory, the behaviour is the same.
    Another reproduction is running the BasicIacVC sample, commenting out all lines from gAcroPdDoc->Close(); in InitInstance() and returning TRUE.  If an editable document is opened using the sample, edited then closed using the "X" button, the confirmation dialog is followed by a "Save As" dialog as if it were a read-only document which it is not.
    Any suggestions would be appreciated.
    Regards,
    Evan

    Yes, it does.  (as long as the pdf has been opened via a COM interface)

  • How to get save as dialog box.

    i want to open a "save as" dialog box from file menu.and i want to specify by myself which type of item should be in "Save as type" drop box in the save as dialog box.how to do it???????plz help........thanx in adv.

    I believe that the Sun tutorial over [How To Use File Choosers|http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html] will be able to give you the answer for this one. This and the JFileChooser API and other associated APIs.

  • Resize windows and manage files in save/open dialogs?

    1. How to resize windows by dragging any border or corner?
    2. How to manage files via a Save/SaveAs or Open dialog (rename, delete, copy other files, etc...)?
    My search on these two things only comes up with comparisons and debates about Win vs Mac. Not relevant to the questions! I already run Win XP in Fusion when I have to for work. I don't want to run Windows; I just want to eliminate a couple Mac shortcomings since Apple hasn't. Yet. Maybe it has to do with patents...
    Anyway, does anybody know of a utility or other way to enable these functions in Mac OS 10? (I've tried Pathfinder; it doesn't quite do the trick.)

    I believe you will find a couple of third-party utilities that provide some enhancements for windows. As for file dialogs I can only recommend Default Folder X. You will find these at VersionTracker or MacUpdate.

  • Adding "Favorites" Folders to Photoshop save/open dialogs Vista

    Hi All,
    Most apps in Vista display your folder "favorites" when you save/open. The CS4 apps, however, only display a few folders (recent places, desktop, etc.) and don't let you edit which folders are available to quickly select.
    Anyone know how to force this window to either display additional folders or display your Vista favorites?
    Thanks,
    Adam

    Thanks. From your link I discovered this helpful (and free) app:
    http://www.askvg.com/placesbar-editor-customize-default-places-bar-in-common-file-dialog-b ox-in-windows-and-office/
    Which does it all wisywig.
    I still don't understand the Adobe dialogs don't resemble the Office (and other app) dialogs, which have the favorites folder by default -- obviously most people using Adobe apps need to quickly access a variety of folders on their computer. I do wonder if there is a way to customize these dialogs through the Adobe software.
    Thanks though,
    Adam

  • In javascript how to invoke save as dialog box ,which saves .pdf files only

    Through javascript i generated a save as dialog box. the main problem is , it is only saving .html and .doc files by default. how to restrict it to save only .pdf files.
    the code i used is
    function SaveFile(fname)
    document.execCommand('SaveAs', null, fname)
    <input type="button" value ="save" onclick="SaveFile('');">
    /**********************************************************************/

    this is actually a Java forum its slightly different from javascript
    but try this not sure if it helps
    <input type="button" value ="save" onclick="SaveFile('.pdf');">

  • How to Avoid Save As dialog when Saving

    We recently upgraded Adobe Reader X to XI.  One difference between the two is the behavior of the Save function the first time it is performed.  In Reader X, when Save was selected, the file would simply save the current file, overwriting the original file.  In Reader XI, when Save is selected, the Save As dialog box appears, and if the user does not change the file name or path, a warning pops up asking whether the existing file should be overwritten. I understand that this behavior is a result of Protected Mode being enabled.  Is there a way to keep PM enabled, but always allow files to be overwritten as was the case in Reader X? 

    Yes, it does.  (as long as the pdf has been opened via a COM interface)

  • Save Open dialog box opening very slow

    I have windows 7 professional 64bit OS. whenever i try to open/save as dialog box it appears very slow, then it will say it is not responding then after 10-15sec it will come alive.
    Need help!!!!!!

    Blair,
    I followed your suggestions above....reset IE ...clean boot. Didn't solve the problem.  (had trouble making that MSCONFIG window bigger !? <wink>)
    Problem still exists.  And to be clear, here is the problem(s) ...I believe they are all interrelated.
    #1.  I end the explorer.exe process and restart it.  Run Explorer and start clicking folders in my FAVORITES.  System hangs for about 10 seconds before it catches up.
    Alternatly, after a explorer.exe restart, if I run explorer and start clicking down through folders from the C: drive, there is no hang.   SUSPECT - some sort of file for favorites needs to be rebuilt?!
    #2. Open MS Word.  Type a few letters.  Select File/Save.  Most icons under Favorites are white.  Trying clicking more than one, but system hangs for ten seconds until icons fill in.
    #3.  WINDOWS button, start typing in the search INTERNET....5-10 seconds before Internet Explorer (and other INT* things show up.!  Usually this is instantaneous.
    System Info:
    Great machine and fast for over a year, and now this started FYI.
    OS Name    Microsoft Windows 7 Home Premium
    Version    6.1.7601 Service Pack 1 Build 7601
    Dell System XPS L321X
    x64-based PC
    Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz, 1601 Mhz, 2 Core(s), 4 Logical Processor(s)
    4 gb Ram
    256 SSD
    ACTIONS TAKEN:  (estimated 30 reboots today)
    - Ensure all folders are GENERAL under properties
    - Advanced Attributes - turned off "allow files on this drive to have contents indexed in addition to file properties"
    - Checked Indexed location is C: drive/ User/ just my data areas....reindexed
    - Tried reboot with Windows Search service disabled....no help.  Turned back on.
    - Tried MS Essentials off.  Tried Firewall off
    - Rebuilt ICONCACHE - was 8mb, now less 450kb
    - Archived OUTLOOK down to a reasonable size (and had to do the manual compress to reduce the file size after)
    - turned off some Windows visual effects.
    - Turned off Dropbox from autostarting....this was before I tried the Clean Boot
    - turned by ON (default)  in Startup - though it has Unknown MFG and no details  :~(   , i found that it likely is needed for my 64 bit machine.
    Any help would be appreciated.
    Steve

  • How come the "save as" dialog box keeps popping up whenever I try to use alt codes?

    I type with diacritical marks regularly but recently, when I press and hold Fn + Alt + the numerical code, it brings up the "save as" dialog box. This seems to be a Firefox-specific issue because this doesn't happen on Microsoft Word + other programs. I am wondering how to disable this "save as" dialog box shortcut, or how to just get the alt codes to work.

    Hm, this is the list of add-ons that are currently enabled on my browser:
    <br><br>
    Dictionnaire française moderne (it can't be this one because I just installed it today)<br>
    Java Console 6.0.18<br>
    Java Console 6.0.25<br>
    Java Console 6.0.20<br>
    Java Console 6.0.24<br>
    pdfit (doesn't seem like it's this one either)<br><br>
    Conclusion: might it be one of the Java Consoles?
    Thanks!

  • How to use save as dialog box in swing

    hello,
    at the time of start the application by clicking the button, i hv to give the path to save my output file, how can i used this dialog box
    thanks

    [http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html]

  • How to Display save as dialog box.

    Hai all,
    am having a jsp page in which i display some values in Table. if i click a button it should show a save as dialog box, from that i should give a file name then all the content must be save in that file name. Any one give idea to open save as dialogbox from button click.
    Thanks.

    You can t do what you want.
    But you can do something similar..
    In stead of save as do a submit to a servlet and have you servlet download the file to the client
    download by setting your contenttype to
    response.setHeader("Content-Disposition", "attachment; name=\""+filename+"\"; filename=\""+filename+"\";");

  • How To Call Save As Dialog?

    Dear All,
    I have OAS Forms And Report Services10g(9.0.4) on Window 2000 & service pack 4 And 10g Developer Suit.
    To deploy application on web..
    How can I call "Save As Dialog" to save a file on the user's machine through When_Buton_Pressed trigger. The file was generated by the database.
    Any help will be nice.
    Thanks

    Thanks for code
    but when i place on when button trigger it gives this error dialog
    Oracle.forms.webutil.file.FileFunctions bean not found.
    WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work.
    the code was
    Declare
    LC$Target Varchar2(256) := 'text.txt' ; -- file name
    LC$Fic Varchar2(256) ;
    Begin
    LC$Fic := WEBUTIL_FILE.FILE_SAVE_DIALOG
    'D:\',
    LC$Target,
    'Sélectionner un fichier'
    If LC$Fic is null Then
    Return ; --// end user has pressed cancel
    End if ;
    End;
    help needed & Please tell me How can i verify that mine installation & configuration of webtill is correct.
    Thanks
    Rana Adnan

  • How to disable the open dialog when I open preview?

    Hi,
    I click on an PDF in the Finder.
    Preview launches, opens my PDF AND OPENS A OPEN-DIALOG (iCloud) ?
    Why? iCloud is nice, but things like that are annoying and I wish sometimes I can go back to Snow Leopard.
    Is there a secret workaround to fix this?
    Maybe a secret scew driver?
    Many greetings to all!
    rob

    I've had the same issue bugging me since installing Snow, er, lion, er, cat, er, cougar, er, Mountain Lion. Incredibly ANNOYING.
    It's stupid stuff like this and reverse scrolling that really turn long-timer users off. I'm personally glad Forstall got fired for blunders such as these.
    I'm serious peeved that turning off iCloud Documents & Data actually deletes documents and data locally. That's just incredibly stupid.
    MANY thanks mende1 for the answer on how to fix it.

Maybe you are looking for

  • F110 Payment proposal list

    Hi Today after creating a payment proposal list when the user tried to display the proposal list,it is showing all the transaction items of last three years.It should not.It should display only what is created in latest proposal created. I have not c

  • Error in Cisco Application Desktop

    I have the following error when i install the Cisco Agent Desktop application(CAD) with version 7.02 release 3 and i am using cisco call manger 4.2(3) and IPCC Enterprise version (7).

  • Go_item problem

    Hi, I have two different modules. One is customer module and other one is main menu module. Now when I click on customer button in main menu module the customer form comes up, but the cursor does not go to customerID, which is should when i do go_ite

  • Authorization erro

    Hi, While executing process chain i am getting error as "You do not have authorization for the DWB object" in Info package. i repeat this process manually and it gets successfull but then gets error out in DTP as "You do not have authorization for th

  • Strategy-old Hm Movie Org.

    I'm about to embark on a very big project for my family. However, I'm new to iMovie, so I would greatly appreciate any comments on my strategy below: 1) I digitized old 8mm hm movies from the 60's onto 7 mini-DV tapes. Each tape contains footage of v