ADF - Component File Download Listener - Setting the output filename

Studio Edition Version 11.1.1.2.0
Hi, I would like to learn how to set the output filename as current data + filename. I have a button with the component File Download Listener that has theses parameters
Content/Type: application/pdf
Filename: test.pdf
Method: fullReportPDF()
I needed that when the user clicks the button, that he return the current date + filename statically defined.
How i may to make this?

In a bean you implement a method which return the filen ame date and static part concatenated and set it as EL into the af:fileDownloadActionListener
// on the page
<af:fileDownloadActionListener contentType="application/pdf"
                                         filename="#{XYZBean.filename}"
                                         method="#{XYZBean.fullReportPDF}"/>
// in the bean
    public String getFilename()
        String fn = (new Date()).toString() + "static_part.xyz";
        return fn;
    public void fullReportPDF(FacesContext facesContext, OutputStream outputStream) { ... }where XYZBean is the bean where you have implmented the method fullReportPDF.
Timo

Similar Messages

  • XSL-FO Report Query / Named Layout - Dynamically set the output filename

    Does anyone know if it is possible to dynamically set the name of the PDF file which is created via FOP?
    Thanks
    Paul

    John
    Thanks for the quick reply, apologies, I should have been more explicit.
    I am calling apache FOP via a report query and a named column layout using xsl-fo to format the PDF report.
    The call is done via a javascript function which determines which report to print and then submits the approproate REQUEST. The request is picked up by conditional branches and calls the PRINT_REPORT
    The PRINT_REPORT names the PDF file as same as the report query name.
    BTW the long term goal is to store the resultant output as a blob back in the database but I can put that off to phase II of the project as I'm not sure that this is possible. Would be nice though!
    Thanks
    Paul

  • Sun ONE Studio 4 aka Forte: How to set the output path for classes ?

    Help !
    Beginner's question:
    Sun ONE Studio 4 aka Forte:
    How to set the output path for classes ?
    As default, the class files are created in the same directory as the
    sources.
    In opposite, both JBuilder and Together support that there is a tree
    with the sources and another tree with the classes.
    The first answer I got was "not possible with Forte, but just if you write your own "ANT Build script" !
    a) Please point me to a ready-to-use ANT script for this purpose, if such is available
    b) Is using ANT instead of the MAKE as comfortable ? Besides the separation of sourcecode and classes, I would like to keep everything else to be the same, i.e. I don�t want to edit the ANT file if I enlarge the project by directories or files.
    Tia
    Sincerely
    Rolf

    You can set S1S's options to place newly created .class files in a specific location.
    Identify the compiler that is being used - Open the S1S's Tools/Options window, expand Editing and select Java Sources. Note the Default Compiler value. (If it's one if the Ant options, you use Ant to specify this option, not S1S.)
    Open the S1S's Tools/Options window, expand Building/Compiler Types and select the appropriate compiler.
    The Properties tab of the compiler has the property Target, which sets the filesystem where the compiler output is directed. If you choose <not set>, the .class files are written to their source directory.
    When you set the Target, your change affects all classes that use this compiler.
    Very few options can't be set in S1S; the challenge is finding out where they're set!

  • I cannot download Mavericks. Every time the file download stops a message appears that says the file is damaged and cannot be used to install Mavericks. I delete the file, download again and the same message appears. What can I do?

    I cannot download Mavericks. Every time the file download stops a message appears that says the file is damaged and cannot be used to install Mavericks. I delete the file, download again and the same message appears. What can I do?

    I only have one video project that I ever published to iDisk. It didn't have any music or photo files attatched to it, just a few clips stitched together. I can play these clips right now in the Event Library (so I know the source files are on my computer), but strangely, under the Project Library, the project is not there. I'm almost certain that I didn't store the project on iDisk; I just completed the video and published it to iDisk (as a .mov file I think) for family to see. I've tried to figure out how to get iDisk to stop looking for this project to no avail.
    I don't know if others have experienced this, but if I click on any project and on the menu bar select Share --> Remove From --> Media Browser... it lists iPod, iPhone, iPad, tv, Computer and MobileMe. Why would MobileMe be an option here? This is the case for any video project I select. Didn't iLife '11 and/or OSX 10.8 remove all mention of MobileMe? I wonder if this is part of the problem too.
    Edit: I just removed every project I have from the Media Browser. Still no luck.

  • How to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B

    Hi Friends,
    How to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B.
    External Trading Partner is sending the EDI 856 via AS2 URL to our Oracle B2B Server.
    In the inbound 856 agreement, we have checked the option of Funtional Ack and also Functiona Ack handled by B2B is yes.
    We have the outbound agreement which is sending that Functional ack 997 (auto generated by oracle b2b) and we have specified the Outbound AS2 channel of the Partner.
    997 doc is being sent to external partner using AS2 channel, but the filename is generating as '40101'.
    Please can you let me know how to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B.
    Appreciate your valuable answers!!
    Thanks,
    Amirineni

    Amirineni,
    AFAIK, there is no option to set the file name when the 997 is generated automatically by B2B.
    Alternatively, if this is a must requirement, you can generate the FA from backend and  send to B2B with MSG_TYPE =9. In this case, you can set the header with filename (How to set the actionname property in B2B 11g)

  • Can we set the output to be saved as pdf file?

    Hi Guru,
    We need to have a soft copy of the output, for example, the picking list or commercial invoice, when we create these output, they can printed out, but if we can have a pdf format soft copy from the SAP at the same time?
    thnaks,

    And can we develop a Z program with a logic to make it possible to automatically save the output file as pdf file by batch, by user name and by dates?
    Thank you very much,

  • Partial Submit problem with file download listener

    Hi All,
    I am exporting a table to PDF in my jspx page. For this i have written below code:-
    <af:commandImageLink id="cil6" icon="pdf.png"
    partialSubmit="true"
    >
    <af:fileDownloadActionListener contentType="application/pdf"
    filename="SumData"
    method="#{Sum.exportToPDF}"/>
    </af:commandImageLink>
    It is saving the pdf at a desired location. But as i have made my COMMAND LINK is not executing partial submit behaviour inspite that i have made it partialSubmit="true" .
    After downloading pdf when i click anyother button i get an alert saying...DO YOU WANT TO RESEND THE INFORMATION TO SERVER?
    I don't want this behaviour but i am unable to debug this. Please help.

    Hi,
    afaik.. fileDownloadActionListener does a post to server..even if you do partialSubmit to command component
    After downloading pdf when i click anyother button i get an alert saying...DO YOU WANT TO RESEND THE INFORMATION TO SERVER?I guess you might not have enabled partialSubmit on the other button..
    Try these options, in your web.xml set following in context initialization parameters section
    org.apache.myfaces.trinidad.PPR_OPTIMIZATION                  on
    oracle.adf.view.rich.pprNavigation.OPTIONS                          onRegards.

  • Win2012R2 error 364 Content file download failed.Reason: The server does not support the necessary HTTP protocol.

    Im running WSUS on Windows 2012 R2. Installed over "Add Roles and Features". Configured, synchronisation works, but can not download any updates.
    System
    Provider
    Name]
    Windows Server Update
    Services
    EventID
    364
    Qualifiers]
    0
    Level
    2
    Task
    2
    Keywords
    0x80000000000000
    TimeCreated
    SystemTime]
    2014-08-27T06:43:36.000000000Z
    EventRecordID
    390
    Channel
    Application
    Computer
    wsus-server.murrcz.local
    Security
    EventData
    Content file download
    failed. Reason: The server does not support the necessary HTTP protocol.
    Background Intelligent Transfer Service (BITS) requires that the server support
    the Range protocol header. Source File:
    /msdownload/update/software/crup/2011/03/windows6.1-kb2506014-x64_8c22199a738b51dbfe78262ca21ba98cf8bdeca2.cab
    Destination File:
    C:\WSUS-updates\WsusContent\A2\8C22199A738B51DBFE78262CA21BA98CF8BDECA2.cab
    The online help not works:
    Content download has failed. BITS service is not starting or is  stopping during downloads.
    Open a command window.
    Type sc config bits start= auto
    Type net stop bits && net start bits
    Type net stop wsusservice && net start wsusservice
    Start WSUS 3.0: Click Start, click Administrative Tools, then click
    Microsoft Windows Server Update Services v3.0.
    Click Synchronization Results.
    In the Action pane, click Synchronize Now.
    Verify
    Look for the corresponding error event.
    Open a command window.
    Type cd <WSUSInstallDir>\Tools
    Type wsusutil checkhealth
    Type eventvwr
    Review the Application log for the most recent events from source Windows Server Update Services and event id 10030.
    The KB922330 not aplicable, ExecuteSQL.exe not present.
    Please help.
    Thanks

    .\SQLCMD.EXE -S \\.\pipe\MICROSOFT##WID\tsql\query -d "SUSDB" -Q "update tbConfigurationC set BitDownloadPriorityForegroud=1"
    This should be considered a temporary fix. It will saturate your Internet connection during periods of WSUS downloads in this configuration.
    The correct and permanent fix should be to resolve the failure of your perimeter device to properly support the HTTP v1.1 protocol specification (which is now some 14 years old).
    Either your device is misconfigured, or it needs a firmware update to support the full specification.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • In an Excel template file, can I set the Folder Path in the SaveAs Dialog box?

    I have an Excel template file (xltm) and, with help from the forum, I now have a Workbook_BeforeSave subroutine to save the template as a macro enabled file (xlsm).  I’m so thankful for that help from Edward in the forum.
    I also want to set the default folder location to save the file. I really only need it when the template is saved as a new xlsm file, because if they open the xlsm file, it’s usually opened from the default folder path so any save would normally go back
    to where the file was opened.  However, with a template (even if the template is in the default folder) the Saved template reverts back to the user’s documents folder.
    Is there a good way to do this?
    I tried to modify the Workbook_BeforeSave code like this:
    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Dim FolderDir As String
    Dim FileNameVal As String
    FolderDir = "Z:\save\data\place\"
    If SaveAsUI Then
    If Dir(WorkBookFolder, vbDirectory) <> "" Then
    Application.DefaultFilePath = WorkBookFolder
    End If
    FileNameVal = Application.GetSaveAsFilename(, "Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
    Cancel = True
    If FileNameVal = "False" Then 'User pressed cancel
    Exit Sub
    End If
    ThisWorkbook.SaveAs Filename:=FileNameVal & ".xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled
    Application.EnableEvents = True
    End If
    End Sub
    But there are a lot of checks that would need to be done.
    I'm not sure how to only default the folder saved only when they open the template, but not change it when they just open an already saved Excel file created by the template (with all the active content, macros, etc.).
    Alan Edwards

    Hi Alan,
    store the path\filename in the 1st argument:
    FileNameVal = Application.GetSaveAsFilename("C:\*.xlsm", "Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
    Andreas.

  • Where are files downloaded to on the mac when creating a pdf from web pages?

    where on the mac HD are files downloaded to  when creating a pdf from web pages?
    Im creating web pages from the whole site so creating a large document, so wondered where these fiels are stored on the mac so I can delete when finished as dont want to clog up the hard drive.

    Look at the LiveCycle server products.

  • How to set the output list in alv

    hai all,
    i have copied the standard alv program into customized and the out put of customized have changed . but the output listy of this customized program is to be changed like standard program . please tell me how to do this i have setting the current layout of it . it will display only for time been whemni come out of that program it will change .

    Hi,
    After changing the layout to desired output. Save the layout and set it as default. Then it will work for every time.
    Thanks
    Chandra

  • ADF 11g: Possible to programatically set the pivot handle label ?

    Hi all,
    I am using JDev/ADF 11.1.1.3. I have a pivot table and I would like to dynamically set the pivot handle labels. The value needed for the label is another column in my view object.
    I tried 3 different approaches to no avail and I am running out of ideas:
    1) I tried to override the createViewRowAttrHints method as per Steve's article (http://blogs.oracle.com/smuenchadf/examples/#137). While I could see that it did work in the BC tester, it did not get picked up by the pivot table
    2) I tried to set the value in the page definition but the itemLabel tag seems to only accept a literal
    3) Lastly, I tried the setLayerMetadata method in the underlying DataDirector, still no dice.
    If anyone could point me in the right direction, it would be greatly appreciated.
    Thanks,
    Michel

    Hi Dharmathej,
    Wht Jdev version u using....... since in JDeveloper 11.1.1.4 ADF provides to hide the status bar of the panelCollection
    refer here http://ramadf.blogspot.com/2011/01/jdeveloper-11114-af-panelcollection.html
    Regards,
    Suganth.G

  • Adding numbers in a file a and saving the output in another file.!

    can any one pls tell me how to add numbers from a textfile and save the output in another textfile. i'm new with java so pls help out..

    Hi Friend,
    your statement is not clear, it's bit confuse
    this is my unserstanding,
    you want to open a file and read the values then add numbers,
    latter save the sum in a new file.let me know if this is the thing, I can help u
    with Cheers
    Prasanna

  • How can i set the output automatically

    actually wen i m raising a sales order for each sales order i ve to maintain the out put setting so how can i i set it universally so that for all sales order which i ll raise automatically the out put ll be shown.

    Hi Subrat - Hoping that you want the output to be set based on the sales order type, here's what you can do. From what you said, it seems you have the condition type defined already.
    Now, create an access sequence (NACE->V1->press F6 for access sequence) with just one field from table 7 (SAP Supplied table)...field name AURAT - Sales document type. (You must already have access sequence 0002 defined). If you want, use it instead of defining new one.
    Next, assign this access sequence to the condition type (again at NACE-V1-F5 for output types).
    Next, assign the output type in the procedure relevant to your sales document.(NACE-V1-F7 for procedures).
    Now create the condition record (NACE-V1-F8 for records->select your condition type and create the entry).
    This will force the condition onto every sales order with this sales order type. Also, don't forget to set WE20 up if your condition type medium is EDI...
    Thanks
    Nikhil

  • How to set the output in a Portlet?

    Hi,
    I'm creating a JSR-168 JSF Portlet application using Java Sun Studio Creator 2 Update 1. In my simple portlet, I want to be able to click a button and then see a page with a static text saying 'Button Clicked'. In my application:
    1) I create a JSP page with one button
    2) I modify that button's action method
    3) In the action method, I can access the ActionRequest and ActionResponse
    I want to be able to access the RenderRequest and RenderResponse so that I can modify the Portlet's output stream and thus modify the resulting page.
    1) In the portlet created by Java Sun Studio Creator, how can I access the RenderRequest and RenderResponse?
    2) More generally, how can I modify the output of a portlet page if I use the Java Sun Studio Creator portlet project? Is there a tutorial I can follow?
    Thanks,
    Marc

    Hi,
    I'm creating a JSR-168 JSF Portlet application using Java Sun Studio Creator 2 Update 1. In my simple portlet, I want to be able to click a button and then see a page with a static text saying 'Button Clicked'. In my application:
    1) I create a JSP page with one button
    2) I modify that button's action method
    3) In the action method, I can access the ActionRequest and ActionResponse
    I want to be able to access the RenderRequest and RenderResponse so that I can modify the Portlet's output stream and thus modify the resulting page.
    1) In the portlet created by Java Sun Studio Creator, how can I access the RenderRequest and RenderResponse?
    2) More generally, how can I modify the output of a portlet page if I use the Java Sun Studio Creator portlet project? Is there a tutorial I can follow?
    Thanks,
    Marc

Maybe you are looking for

  • Failed to initialize  Databank exception when run from OLT

    HI All, I've created a script with an associated databank,that runs perfectly fine when run from OpenScript. But when I run from OLT, the following waring is encountered. Start failure message from agent "OLT Server": oracle.oats.common.databank.Data

  • Word Processing document to fit screen size.

    Hello. I have opened Appleworks and then opened a new WP document to start work on. The problem is it is only filling a third of the available screen. It appears to be a real waste. I want to work on the document while it is displayed using every ava

  • [SOLVED] Guest Arch in Virtual Box Internet Problems

    I have installed Arch a few times already in virtual machines on Virtual Box and each time it is unable to configure the internet connection properly.  Having gone through the beginner wiki-pages on starting with Arch, I have tried "ping -c 3 www.goo

  • I want to restore my MacBook with Lion, but only keep data

    My MacBook is slow and buggy, I already have Lion installed. All I want is to keep all my Data (Songs, videos, pics, etc) but want everything else with Factory settings, is there an easy way to go about this?

  • Command buttons best practice

    Hello, I would like to ask how others design their GUI with several command buttons (OK button Boolean). For instance, there is a simple application where the user can start data acquisition by clicking on a button with text "Start monitoring". Inste