Download in adf 11

I'm using fileDownloadActionListener component attached to a button
code
jsp:
<af:fileDownloadActionListener method="#{Dok.onDownload}"
contentType="#{Dok.mime}"
filename="#{Dok.fname}"/>
backing bean:
public void onDownload(FacesContext facesContext,
OutputStream outputStream) {
FacesCtrlHierNodeBinding f=(FacesCtrlHierNodeBinding)this.tableD.getSelectedRowData();
if(f==null) return;
BlobDomain doc =(BlobDomain)f.getRow().getAttribute("Dat");
String fname = (String)f.getRow().getAttribute("Name");
this.setFname(fname);
String mtype ="";
if(fname.endsWith(".pdf") || fname.endsWith(".PDF")) mtype="application/pdf;charset=UTF-8";
if(fname.endsWith(".doc") || fname.endsWith(".DOC")) mtype="application/msword;charset=UTF-8";
this.setMime(mtype);
try {
outputStream.write(doc.toByteArray());
outputStream.flush();
outputStream.close();
} catch (Exception ex) {                  
ex.printStackTrace();
return;
code works fine but the document is opened in the same window which opens problem returning to application (back button isn't good solution)
so what I have to do to open file download dialog instead of opening document?

Hi,
not sure if this is something to fix in the code. I have different behaviors with different browser so I think its a MIME type configuration issue. The work around would be to use a Servlet for the download and reference it from a dialog you open
Frank

Similar Messages

  • Where is the API download for ADF Faces 10.1.3.2?

    I can still download adf-faces-10_1_3_0_4 which contains the API documents in a /doc directory.
    Where is the API download for ADF Faces 10.1.3.2?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                   

    .. will check if we can make it available
    Frank

  • File upload, download using ADF UIX and not JSP

    I have examples for the file upload, download using JSP
    But I want to use ADF UIX. Look and feel in this is impressing and I want to use this. Any one have example for this.
    Users will select a file from their desktop
    This will be stored into the database (Any document. Word, Excel)
    When they query the records then the UIX column need to give a hyperlink. Clicking on the link should prompt to download the file to the local system

    Sure, I use the Apache Commons File Upload package, so that is what I will discuss here ( [Commons File Upload|http://commons.apache.org/fileupload/] ).
    The Commons File Upload uses instances of ProgressListener to receive upload progress status. So first create a simple class that implements ProgressListener:
    public class ProgressListenerImpl implements ProgressListener {
        private int percent = 0;
        public int getPercentComplete() {
            return percent;
        public void update(long pBytesRead, long pContentLength, int pItems) {
            if (pContentLength > -1) { //content length is known;
                percent = (new Long((pBytesRead / pContentLength) * 100)).intValue();
    }So in your Servlet that handles file upload you will need to create an instance of this ProgressListenerImpl, register it as a listener and store it in the session:
    ServletFileUpload upload = new ServletFileUpload();
    ProgressListenerImpl listener = new ProgressListenerImpl();
    upload.setProgressListener(listener);
    request.getSession().setAttribute("ProgressListener", listener);
    ...Now create another servlet that will retrieve the ProgressListenerImpl, get the percent complete and write it back (how you actually write it back is up to you, could be text, an XML file, a JSON object, up to you):
    ProgressListenerImpl listener = (ProgressListenerImpl) request.getSession().getAttribute("ProgressListener");
    response.getWriter().println("" + listener.getPercentComplete());
    ...Then your XMLHttpRequest object will call this second servlet and read the string returned as the percent complete.
    HTH

  • Where can I download the ADF sources?

    Hello,
    the subject contains already the question: where can I download the sources for the current ADF version 10.1.3.0.4?
    I searched across the internet and only found the sources for an old early access version.
    thanks, Daniel

    Hello oheimbur,
    I need the sources from the original oracle ADF (adf-impl, adf-api, adf-share Jar's) for debugging. I also found the Trinidad project, but this is unusable for debugging because the packages are renamed.
    Daniel

  • Clearing VO after the search in ADF C, JSP

    How do you clear a where clause of a VO after searched for a record. I have VO using more than one table. As soon as you open the view it shows all the records. I have Find and Execute buttons to search for specific records in the table. This works fine. But if there no records for the Find, I want to reset the VO to show all the records. How do you do that? Thanks.

    Maybe this can work:
    1. Add a public method to your Application Module (right click on AM and go to Application Module Class) - example:
    public void showDetail(){
    ViewObject vo = (SearchDynamicViewImpl)findViewObject("SearchDynamicView1");
    String s_where = "ID = 100";
    vo.setWhereClause(s_where);
    vo.executeQuery();
    2. Use avaliable VO methods to programmatically control the View Object (i.e., see clearcache() method):
    Some references:
    * http://www.oracle.com/technology/products/jdev/tips/muench/mostcommon/index.html
    * Re: most common ADF Business Components article
    * http://www.oracle.com/technology/products/jdev/archive.html (download SRDemo ADF BC Edition - has some good code examples)
    3. Drag and drop the AM Method onto your page and select Command Button - will end up with code on .jspx page like this to call AM Method:
    <af:commandButton actionListener="#{bindings.showDetail.execute}"
    text="showDetail"
    disabled="#{!bindings.showDetail.enabled}"/>
    I have not done this before but if I thought these references may help.

  • ADF application error

    (oracle.jbo.DMLException) JBO-26061: Error while opening JDBC connection.How to remove this exception while running ADF application in Integrated weblogic server?

    this will help you
    http://sathyam-soa.blogspot.com/2011/03/adf-runtime-db-connection-error.html
    http://radalcove.com/blog/
    Understanding available WebLogic Server downloads for ADF Applications
    go this section. oracle.jbo.DMLException: JBO-26061:
    soultion is available.
    Edited by: Erp on Oct 20, 2011 3:03 AM

  • How to get the ADF Mobile Client extension

    Hi all,
    Please post some link in which I can download the ADF Mobile Client extension for Jdeveloper 11.1.1.4.0 directly to my local disk. I have tried going through Help --> Check for updates in Jdeveloper but my proxy does not
    allow it. so the only possible option for me is to download it to my local disk and should update it. I searched for it but was unable to find the appropriate link so I got to post here. Kindly help me out in finding it please....
    Thanks,
    Phanindra.

    Hi Timo,
    Now I am more confused whether it is available or not. In the oracle site I have seen that I can develop mobile apps using trinidad components in which <trinidad-config> file can be used to define the different platforms on
    which the application can be rendered. Is it true ?? When I created a mobile app I got only <trinidad-config> I didnt get <trinidad-skins> in which I can define the style sheet. There is a lot of confusion in how to proceed to
    develop the application. Kindly help me on this. I need to develop a mobile app which is not only accessible in Blackberry but should also be able to get rendered on the other platforms also. Which is the best way to develop a
    POC on this. Kindly help me timo.
    thanks,
    Phanindra.

  • ADF Faces Components Demo - Illegal Characters error

    Hi ,
    I downloaded the ADF Faces Components Demo for version 11.1.2.3.0 from http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html . I tried following instructions :ADF Faces Components Demo Install Instructions
    This is getting downloaded as rcf-dvt-demo.zip. I renamed it to rcf-dvt-demo.war.
    Then I tried to create a project from this war... and got following error :
    The project file "C:\rcf-dvt-demo.war!\Project.jpr" is not valid. The file name may contain illegal characters, it may be too long, or permissions for this file or one of it's parent directories may be restricted.
    Please help . Am i downloading from correct location and following the correct instructions.
    Thanks,
    Rajdeep

    Good Catch Timo ... Lot of thanks.
    Still I will put down the silly mistake of overlooking the wizard.
    I was doing the correct thing - "create a new application and inside this application workspace you add a new 'project from war'." But mistake was .. First step of wizard it is project name and path,, and then second step is war location... and in hurry I was giving the project name and war location in first step.
    Thanks,
    Rajdeep

  • ADF Faces using & pricing

    Hello,
    I'm using JavaServer Faces now and I'd like to use ADF Faces components - it can make make my development better. The question is about it's pricing - can I use it for free, with any Application Server or Container? My IDE is JDeveloper.
    The story is as follows. On the one hand, ADF is not free now, and in the JDeveloper Licence Agreement (when downloading JDeveloper) ADF Faces Components are included with another components: "Components" refers to the following Application Development Framework ("ADF") components of the Programs: ..., ADF Faces Components, .... So it seems that I can't use it for free everywhere.
    On the other hand, ADF Faces is open source now (http://oss.oracle.com/trinidad-adf-faces.html), in FAQs (http://www.oracle.com/technology/products/jdev/htdocs/faq_adffaces_apache.html) it's written that JDeveloper is a tool to use with ADF Faces, and in JDeveloper & ADF Pricing FAQ (http://www.oracle.com/technology/products/jdev/htdocs/jdevpricefaq.html ) it's written in the "How will customers know if they are using Oracle ADF?" section it's written:
    You are using Oracle ADF if your system is using one of the following:
    * Oracle ADF Business Components (pka Business Components for Java)
    * The ADF Model layer (creating data controls from Java components, EJBs, or Web services)
    * ADF's data actions or data pages in Struts
    * ADF UIX
    * ADF Swing (p.k.a JClient)
    So, ADF Faces are not mentioned here.
    So, how can I use ADF Faces components for free? Download from Apache - Trinidad project? Or I can use those that come with JDeveloper?
    Thanks in advance.

    Hi,
    ADF Faces is under the ADF licence and is charged for on any non-Oracle Application server environment. If you deploy on OracleAs then ADF licence is included in teh AS licence.
    If you want free components then you need to download Apache Trinidad components. They are open source. You can configure Trinidad for use in Oracle JDeveloper as documented : http://www.oracle.com/technology/products/jdev/howtos/1013/trinidad/trinidad.html
    Frank

  • Where is adf-faces-demo.war?

    Hi everyone,
    Does anyone know where I can find and download adf-faces-demo.war that was mentioned in the following page
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.jsf_apps%7Cadfcreate%7Caf_ademowar%7Ehtml/
    I read the Jdev documentation and still don't get the idea how af:progressIndicator work with af:poll and my long running process. I have a button on a jsp that runs a long process via calling of stored procedure. As this DB process usually takes long time to complete, the middle tier will be time-out before it. How can I use progressIndicator and poll to keep user notified and keep the session active ?

    Hi Bonnie,
    You can download it from this page:
    http://www.oracle.com/technology/products/jdev/howtos/10g/adfjsf/how-to-adf-faces-10gjdev.htm
    Under the heading 'Creating an "ADF Faces " Library and registering the ADF Faces tag libraries', point 1) Download the adf-faces-ea10.zip from here. Unzip this file to a separate directory such as d:\adffaces. This directory will contain the subdirectories docs, lib, and src, and the adf-faces-demo.zip. The lib directory will contain the required jar files and tld (tag library descriptors) files for JDeveloper to work with ADF Faces.
    Hope this help.
    Regards.

  • Is weblogic + ADF free for commercial use?

    Hi,
    I have downloaded JDev + ADF 11.1.1.4 and its working great.
    Can any one please confirm and guide to corresponding links regarding commercial usage of weblogic? Is it free to use for commercial purpose?
    Thanks,
    Harish

    I would start by looking at Oracle information - while we can provide hints and give guidance, Oracle is the only legal source for license information.
    My suggestion in general is to use the Oracle site and the Oracle docs, and take a hard copy of that information as backup in case of legal challenges.
    That said, the intent for XE is to provide a 'no license fee to put into production' version of Oracle Database Server. It has limited functionality (no Java in DB, limited storage and memory) so it is not generally a worry for Oracle. The supporting references are
    http://www.oracle.com/technetwork/database/express-edition/overview/index.html - which says "It's free to develop, deploy, and distribute; ..." and
    "Oracle Database XE is a great starter database for:
    Developers working on PHP, Java, .NET, XML, and Open Source applications
    DBAs who need a free, starter database for training and deployment
    Independent Software Vendors (ISVs) and hardware vendors who want a starter database to distribute free of charge
    Educational institutions and students who need a free database for their curriculum
    as well as http://docs.oracle.com/cd/E17781_01/license.112/e18068/toc.htm, in which we read
    "License Rights
    We grant you a nonexclusive, nontransferable limited license to use the programs for: (a) purposes of developing, prototyping and running your applications for your own internal data processing operations; (b) you may also distribute the programs with your applications; (c) you may use the programs to provide third party demonstrations and training; and d) you may copy and distribute the programs to your licensees provided that each such licensee agrees to the terms of this Agreement. You are not permitted to u...'
    YOU ARE ENCOURAGED TO HAVE YOUR LEGAL TEAM LOOK AT THAT LICENSE DOC.

  • ADF Facelets support...not so easy !!!

    I don't succeed the integration of ADF with tiles (JSPTilesViewHandler) !!!
    Now i want to test Facelets with ADF:
    i have downloaded the adf-facelets.jar, jsf-facelets.jar, commons, el, adf...
    I have read some forums..
    But i don't succeed....
    Is there any tutorial, blog with a complete sample application integration jspx and facelets...
    With:
    1. libraries used
    2. web.xml conf
    3. layout file (.xhtml or .jspx)
    4. page (.jspx) using the layout

    Frank,
    Thanks a lot for this proposal. I'really think that i can help a lot of people !!!
    ADF is a great framework but integration with tiles and facelets is an other story !!!
    Tiles with JSPTilesViewHandler is for me a good way for templating:
    1. no specific templating code called in the pages using the template
    2. tiles definition described in a separate page.
    It seems (correct me if i'm wrong) that with facelets, pages using a specific template have to include specific facelets code (ui:composition)...
    I don't know what is the best approach for templating...

  • JD not able to paint JSF ADF component when upgrade to ea13 from ea11

    I download the adf-jsf-ea13, did the local update. Imported the new adf-demo for ea13. Everything seem to be functioning as expected.
    I went to my own project, replace all the ea11 jar file with the ea13 jar files. However, the gui are not painting for the .jspx but only for my own project, which was fine before.
    Let me know if I need to do something else to this project because the component demo is paing the gui.
    thanks,
    tommy

    This has been resolved...
    I have dig this issue and found the problem...
    Issue: Presentation server is not started because of the tag which is in instanceconfig.xml <DefaultFreezeHeadersClientRowBlockSize> in the below path...
    ..\instances\instance1\config\OracleBIPresentationServicesComponent\coreapplication_obips1
    Solution: Based on the error I have checked the instanceconfig.xml file folder. I found there are 2 file of it and one is .bak file.
    So i have compared 2 files. In the .bak file DefaultFreezeHeadersClientRowBlockSize tag is not available. So i have removed and tried to restart the services.
    Able to run the Services.
    Hope this will help if any one has the issue.
    Note: Not sure how the instanceconfig.xml file got updated. If any one know please reply here...
    Arjun

  • Using oracle adf mobile

    It also comes with PhoneGap. which allows you to use any feature your phone offers, like sensors and camera. It's probably the most complete solution for mobile development out there, simply because with Oracle ADF Mobile, you can write Native, Hybrid or Web applications for your smartphone and tablet.
    Do you want to take a quick look on what can be done with it? Check out this video!
    Now, to start with Oracle ADF Mobile, here are the first steps you will have to go through.
    1.     Download Oracle JDeveloper
    Go to this link and download the install file for your environment (Windows, Linux-32bit or Generic)
    2.     Install JDeveloper (of course)
    If you need help on this, look at the documentation (if you've downloaded 11gR2, click here)
    3.     Download Oracle ADF Mobile Bundle
    This is the download page for Oracle ADF Mobile. Accept the license as usual at the top, and follow with the Download button. It will take you to another page, where you will see a table containing a download link. Click on it and it will start downloading a ZIP file.
    4.     Start JDeveloper
    Start Oracle JDev. It may self update. Restart the IDE if you are asked to.
    5.     Go to Help > Check for updates
    6.     Click Next and make sure you are at the "Source" tab
    7.     Select "Install From Local File"
    8.     Select the Oracle ADF Mobile ZIP you downloaded on step 3
    9.     Finish the process
    Now you have JDeveloper with Oracle ADF Mobile sucessfully installed!

    Hey,
    this is not a blog!
    Frank

  • OEID issues in upgradation from 3.0 to 3.1

      Hi All,
    I am trying to upgrade to Endeca 3.1 from Endeca 3.0 but I am facing below issues.
    When I am trying to run install.sh for integrator ETL with eclipse-java-indigo-SR2-linux-gtk-x86_64.tar.gz  I am facing below issue:
    [abindal@indl72020 EID_3.1.0_IntegratorETL]$ ./install.sh
    The installation process requires stable internet connection.
    Default IntegratorETL installation directory: /home/abindal/Oracle/Endeca/
    ery/3.1.0/IntegratorETL
    Do you want to use the default directory (Y/N)?Y
    The target directory you specified already exists. Do you want to overwrit
    Y/N, Y to overwrite it, N to specify another directory)? Y
    Enter the full path of Eclipse package file: /scratch/abindal/eclipse/ecli
    va-indigo-SR2-linux-gtk-x86_64.tar.gz
    Extracting Eclipse ...
    gzip: stdin: unexpected end of file
    tar: Unexpected EOF in archive
    tar: Unexpected EOF in archive
    tar: Error is not recoverable: exiting now
    Installation failed. Extracting Eclipse package file failed.
    When I am trying to run install.sh for integrator ETL with eclipse-jee-indigo-SR1-linux-gtk-x86_64.tar.gz  I am facing below issue:
    [abindal@indl72020 EID_3.1.0_IntegratorETL]$ ./install.sh
    The installation process requires stable internet connection.
    Default IntegratorETL installation directory: /home/abindal/Oracle/Endeca/Discovery/3.1.0/IntegratorETL
    Do you want to use the default directory (Y/N)?Y
    The target directory you specified already exists. Do you want to overwrite it (Y/N, Y to overwrite it, N to specify another directory)? Y
    Enter the full path of Eclipse package file: /scratch/abindal/eclipse/eclipse-jee-indigo-SR1-linux-gtk-x86_64.tar.gz
    Extracting Eclipse ...
    Installing Integrator ETL plugins to Eclipse, the process will take several minutes ...
    RSE plugin installation failed. Please check your internet connection.
    I looked at the configuration file and it has below lines:
    !SESSION Tue Nov 12 23:36:33 IST 2013 ------------------------------------------
    !ENTRY org.eclipse.equinox.launcher 4 0 2013-11-12 23:36:33.360
    !MESSAGE Exception launching the Eclipse Platform:
    !STACK
    java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
         at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
         at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
    Is it that the eclipse file which I am using is not correct or am I missing something?
    Regarding the adf patch application I downloaded the adf patch p17509664_111160_Generic.zip and with the help of read me I am not able to apply the patch.I even downloaded p6880880_112000_Linux-x86-64.zip for OPatch but still I am not able to apply.Do we have some doc where we have detailed steps on how to apply this patch.Is it necessary to apply this patch or even if the patch is not applied its ok.
    Thanks in Advance.

    Mr Frank
    If i follow your's intructions i got the next:
    opatch' is not recognized as an internal or external command, operable program or batch file.
    So, i do it like this...
    1. Upack the p17509664_111160_Generic.zip file in "C:\Oracle\Middleware\oracle_common\OPatch.
    The unpacking  produce: C:\Oracle\Middleware\oracle_common\OPatch\17509664
    2. Shut down WebLogic Server. (It was down)
    3. Open a command prompt in admin mode. On Windows, you must run in admin mode because OPatch will admin rights to several directories to lock and create files. (OK)
    4. NOT
    5.. CD to the directory where the patch was unpacked:  cd C:\Oracle\Middleware\oracle_common\OPatch
    6..Run OPatch with the "apply" parameter and the -oh flag pointing to the ADF home directory & -oh pointing to the jdj
    ...I use this...
    opatch.bat apply 17509664 -oh C:\Oracle\Middleware\oracle_common -jre C:\Java\jrockit-jdk1.6.0_45-R28.2.7-4.
    1.0
      As a result:
    Oracle Home       : C:\Oracle\Middleware\oracle_common
    Central Inventory : C:\Program Files\Oracle\Inventory
    from           : n/a
    OPatch version    : 11.1.0.9.9
    OUI version       : 11.1.0.9.0
    Log file location : C:\Oracle\Middleware\oracle_common\cfgtoollogs\opatch\17509664_Nov_22_2013_09_45_36\apply2013-11-22_09-45-36AM_1.log
    OPatch detects the Middleware Home as "C:\Oracle\Middleware"
    Applying interim patch '17509664' to OH 'C:\Oracle\Middleware\oracle_common'
    Verifying environment and performing prerequisite checks...
    OPatch system modification phase did not start:
    Patch "17509664" is not needed since it has no fixes for this Oracle Home. Please see log file for details.
    Log file location: C:\Oracle\Middleware\oracle_common\cfgtoollogs\opatch\17509664_Nov_22_2013_09_45_36\apply2013-11-22_09-45-36AM_1.log
    OPatch stopped on request.
    Where it will be the right Home for this patch for no getting the ---> Patch "17509664" is not needed since it has no fixes for this Oracle Home. Please see log file for details.
    Thanks
    EBrauerP

Maybe you are looking for

  • Odd preview issue with pdf

    I have a pdf I created from Quark 7. There are a number of items with .5pt rules or boxes around them (for example, business card sized ads with a half point rule). Some rules show fine and others require me to zoom in very close to see them. If I zo

  • Occurence of character in a string

    How can i find how many occurrence of a character in a string? Let's say: 010101010101010: there is 8 0 in that string.

  • Issu in dot11 radio interface

    i have a cisco access point like air-1230b-a-k9 in this ap ios was curropted.when i tried it was successfully load the ios via xmodem. but when i boot it from flash it showing that firmware for dot11radio 0 is not found.image 5001 is not found. what

  • Red Secondaries

    Hi I'm having a real hard time figuring something out. I can do most things I want to do in Speedgrade, but my secondaries get my way frustrated. When I apply a secondary layer, it all seems fine, until I start touching any dials and sliders, in whic

  • Failure to consistently connect to network.

    I have several MacBooks, iPhones, Apple TV's and a couple of other devices all connecting to my home network.  I just purchased two new Airport Extremes and an Airport Express.  They are all hardwired to a time capsule that is connected to my cable m