[SOLVED] ADF 11G: open PDF in new window

Hello, I use JDev 11.1.1.2.
I have a page in a workflow associated with a PivotTable and a 'print 'button'.
I use Jasper report to create a PDF document.
I would like this document to open in a new window when the user clicks the button.
I have read several discussions/blogs to do this, but it does not work.

Here's the code for my button:
< af:commandButton text = 'print '.
ID = "cb1" useWindow = "true".
action = "#{viewScope.myBean.goReport} '"
windowHeight = "400" windowWidth = "800."
immediate = "true" / >

where viewScope.myBean.goReport returns ' dialogue: goReport.

Here is the code that I use to create my PDF file:
Create a PDF exporter
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
JasperExportManager.exportReportToPdfStream (printing, byteArrayOutputStream);
FacesContext context = FacesContext.getCurrentInstance ();
ExternalContext ectx = context.getExternalContext ();
HttpServletResponse response = (HttpServletResponse) ectx.getResponse ();
ServletOutputStream out = response.getOutputStream ();
response.setHeader ("Cache-Control" "max - age = 0");
response.setHeader ("Content-Disposition", "inline; filename = Report.pdf");
response.setContentType("application/pdf");
response.setContentLength ((New Long (userInfoBean.getReportStream () .length)) .intValue ());
out. Write (byteArrayOutputStream.toByteArray ());
out. Flush();
out. Close();
context.responseComplete ();


In my workflow encompassing that contains the page I have:
< id = 'report' view >
/report/report.jspx < page > < / print this page >
< / view >

< of-activity-id > * < /-activity-id >
< control-flow-case id = "__1" >
< result id = "__2" > dialogue: goReport < / de-results >
<-activity-id id = "__3" > report < / to-activity-id >
< / control-flow-case >

My report.jspx file I have just a white page attached to a bean to support:
<? XML version = "1.0" encoding = "windows-1252'?" " >
< jsp:root xmlns:jsp = "http://java.sun.com/JSP/Page" version = "2.1".
xmlns:f = "http://java.sun.com/jsf/core".
xmlns:h = "http://java.sun.com/jsf/html".
xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >
< jsp:directive.page contentType = text/html"; charset = windows-1252 "/ >
< f: view >
< af:document id = binding = "#{"d1"backingBeanScope.backing_report_bean.d1}" >
< af:form id = binding = "#{backingBeanScope.backing_report_bean.f1"f1"}" > < / af:form >
< / af:document >
< / f: view >
<!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_report_bean-->
< / jsp:root >

I can't get the PDF document to open it in a new window

If I put only "dialogue: goReport" in the action attribute of button, I managed to have a blank page open.
I have I have a link 'viewScope.myBean.goReport' method which returns the "dialogue: goReport" and contains the code for PDF creation to action button that I have the PDF document that appear, but in the active window.
I tried to put my PDF creation in an actionListener to launchListener code, returnListener, but I still have my PDF document in the window being opened.

I don't know that I do something wrong because it appears that others have found a way to do it, but I'm lost right now.
Can someone help me on this pls.

Jack

Hello

should work with the flow as well. Does the work continuously when it hits in a URL to the browser?

Frank

Tags: Java

Similar Questions

  • I created a link to an attachment, but it supports the complete PDF file, how do I open in a new window?

    I have about 30 PDF documents attached to my main document. When I click on links, the attached document takes up the entire screen. I want it opens in a new window when I click on it, how do I do this?

    Yes, it is possible. Right click on the link using the Add or change the link, and then select Properties.

    Go to the Actions and change the link "Go to a page in another document" action

    Under "Target Document", you will see an option called "open in". Define as 'New window' and press OK.

    You'll have to make it a link both, unfortunately, unless you use a tool to set all links at the same time to behave this way.

  • target for a .pdf with the target _blank link file does not open in a new window.

    I have a simple html document with links to all the value _blank .pdf documents but only opens in a new window.  Others open as _self.  Change the target does not seem to make a difference.

    No idea why this is happening?

    It is preferable to share a link to the offending page, so that we can see the code, simple errors as a lack of "or = can cause what you describe.

    However since you work with PDF files there may not be anything technically wrong with your code.

    Files PDF is a multimedia file that is managed in a number of different ways depending on the settings of the user's browser and plugin installations. What gives the target = "_blank" on a PDF link can open a new blank page and the PDF opens in Acrobat instead. There is no way to force a PDF file to load in the browser, this is a user setting we as developers have zero access to.

  • PDF links to open in a new window

    Hello...

    Is there a way to get added to the module literature PDFs to open in a new window by default when clicked on?

    See you soon... Dave

    Hi David, no, not at the moment and even if you do can be dependent on the browser and plugin dependent. Different browsers behaive differently with the media and files and if people have installed plugins or change their configuration you can not guarantee a regularirty.

  • Workflow task open in a new window

    Hi all

    JDeveloper version: 11.1.1.6
    ADF


    My requirement: my taskflow contains three pages (page1, page 2 and page 3). In the page2 page have a button 'commandImageLink '. When I click on the button "page 2" must be open in the 'new window '.

    Is it possible with workflow can I open fragments in a new window. Please suggest a better way to do this problem.


    Thank you

    -Moahnraj

    Hello

    only the workflow using JSPX documents (or JSF in 11g R2) can be opened in a separate window. To do this, you use a redirect link that refers to the URL of the workflow (as explained in the product documentation)

    Frank

  • How can I set the links to open in a new window?

    I use the links tool in Acrobat 5.05 to create links in my pdf to other sites, not documents. When the pdf file is displayed online, I need these links to open in a new window. Now, they open in the same window, which submits the Viewer to using the back button to return to the original pdf and waiting so he could fully recharge. It is a sizeable pdf file, which makes a lot of your time. I tried unchecking the option on 'Cross Document links in same window', but tests indicated that there was no difference.

    If you need more information to clarify my question, please just ask. Suggestions regarding the solve this will be appreciated.

    My apologies if a similar question has already been asked to answer. I have not found the reference to it in my search.

    Thank you.

    You can use JavaScript to do this. For example:

    app.launchURL ("http://www.adobe.com", true);

    More info is Acrobat JavaScript reference. Note that this method is new in Acrobat 7. You can still use Acrobat 5 to create the JavaScript code, but it won't work for less than 7 versions, or most of the users of non Adobe PDF viewers. If you follow this path, you should add code that checks the version of Acrobat (reader) and just run the code above, if 7 or higher.

  • Everytime I open a new firefox window, a new tab opens with the new window. How do I stop this?

    Everytime I open a new Firefox window, the new window opens to the page of hope (as I want him), but then a tab opens with the new window. I want Firefox to stop doing this. When I open a new window I want just the window to open it. I don't know how to solve this problem I've known idea how I did that happen. First of all, it happened when I hit Ctrl + N to open a new window, but I did not hit the "N" itself. I pressed one of the other keys around the "N" and this issue has started.

    It's quite strange!

    Have you tried to reset Firefox? You will find all the information you need to reset, here:

    Firefox - modules to reset and refresh settings

    Let me know if it worked!

    See you soon!

  • Using firefox 14.0.1. Load a link using the right click and "Open link in new window", translates into a new window opens but doesn't show URL address bar...

    Using firefox 14.0.1. Load a link using the right click and "Open link in new window", translates into a new window opens but doesn't show URL address bar. However, if I click with the right button on a link and select "Open link in a new tab", the tab displays the URL in the address bar. If it works when a new tab it's not in a new window.

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

  • How to prevent the tabs to open in a new window?

    Given that I have updated to the latest version of Firefox, I am plagued with a problem, and I can't seem to stop. When I go back to Firefox and click on any tab, it almost always causes this tab open in a new window. It is a feature - drag a tab in the screen and it will cause this tab open as a window, but I'm not meaning to drag these tabs, I understand! I use Firefox EXACTLY as I've used it for years, but for some reason, it seems to be interpreting my clicks differently - either I'm dragging the tab a * little * bit, or it simply registers that I dragged the tab when I did not. Is there a way to disable this feature? Or a way to decrease the sensitivity of the thing, so that you really need to let slide the tab into the input window opens in a new window? It's really making me batty. I'm about to move permanently to the Chrome.

    To be completely clear: what happens when I'm just trying to switch from one tab to another.

    You have no need to move your cursor a lot when you press the mouse button causes the tear-off/detachable tab in a new tab. No 'sensibility' that I know. The tab in the new window can be moved to the original window.

    To disable the feature, install this: https://addons.mozilla.org/en-US/firefox/addon/bug489729-disable-detach-and-t/

    • Read the information on the page above
    • Set the add-on options: Modules > Extensions, click Options next to the specific Extension (2 options are defined/explained in the page above).

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

  • Firefox suddenly stopped opening 'in a new window"when I ask-open"in a new tab"only

    For the last two days, Firefox has suddenly stopped opening in a new window; Now, I can never have a window open at a time (even though she always let me open several tabs).
    Tried everything down and rebooting not closing of course, but made no difference.
    Don't have no knowledge of changing parameters - I changed or damaged something without knowing?
    The only news I did recently, is download the add-on from the EPUB reader! Is there a link?

    Thanks a lot for your suggestions

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the Add-ons is the cause of the problem (switch to the DEFAULT theme: Tools > Modules > themes).

    • Makes no changes on the start safe mode window.

    See:

    If this does not work in mode without failure, then disable all extensions and then try to find out who is the cause by allowing both the problem reappears.

    • Choose "Disable all add-ons" on issues to troubleshoot Firefox in Safe Mode to set window to disable all extensions.
    • Close and restart Firefox after each change through "file > exit ' (Mac: ' Firefox > leave";) Linux: "file > exit ')
  • folder opens in a new window after update, but the options are correct

    Hello!

    After a few updates to Vista in the past two days, each folder now opens in a new window.

    The problem is: the folder options are correct. They are set to "open each folder in the same window. So I guess this is a new bug in Vista.

    Y at - it someone here with the same problems and maybe a solution?

    See you soon

    You can try to restore Windows back to a previous working state, and then disabling the updates so that it works this way.

    Step 1: To restore Windows to a previous state (before defective updates):

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-system-restore (open the link and follow the instructions).

    Step 2: To disable the automatic updates (so the update defective will not be reinstalled):

    http://Windows.Microsoft.com/en-us/Windows-Vista/turn-automatic-updating-on-or-off (in step 3, select 'Off').

    WARNING: It is not recommended and sometimes even dangerous to disable automatic updates, because they improve the security and reliability of Windows. If the procedures above solves your problem, this means that an update was the likely cause.

    Please report back with your results. Then we can reactivate the automatic updates, but block the update that causes this problem.

    Rifdhan

    If this is your answer, click on "Mark as answer" below. If it's useful, click on "Mark as useful" on the left.

  • Mobile link bug? (opening in a new window the value window)

    I put the link on mobile in the same window, but 98% of the time that it opens in a new window. I tried to make the road to the problem and it's driving me buggy.
    What is happening on the iPhone tests.
    I tried many methods, such as linking them directly to the version of the phone and the substitution of detection devices of Muse, with no luck.
    So I thought that maybe the iPhone default to opening links in a new window when the site is not fully charged. And that sometimes seems to happen however the device indicates that the site is loaded.

    Anyone else notice this behavior?

    Thank you.

    Solved the problem. Don't think that Muse would have such a glaring bug with one report (that's me). Then, of course, the thought goes to the third-party widget and lay the problem. I am posting this for someone else who might encounter the problem.

    This issue is included in the 123muse 'of assistance to Web Page' widget under the PHONE ONLY of PAGES when you check Web App Capable. A great pi when you want to get rid of the IOS header & footer, so that your design looks like what you designed. However the caveat being that all the links will open in a new window, no matter what you set AND you get back to the previous page (on IOS devices) because even if the link opens a new page of your original page is lost. Tested on iPhone 4, 5, 6, 6plus.

    Huge loss of conversion and / or company.

    I hope that the team big 123muse will see this and fix the widget because I do not know that it is clear to this side effect other than the statement...

    "If it's a single page site then the whole site will be a bit like an app in the iPhone or Android itself... »

    Thank you

    Dan

  • Sometimes by selecting an existing tab will lead to open in a new window. Why?

    Firefox browser runs and have a Yahoo homepage and another tab in this window with Yahoo mail. Sometimes have other tabs open in the same window as well. Sometimes, when you move (switching) from one tab to the other tab that I pass will open in a new window itself, rather than stay in the original window. Why does this happen? Please look at the problem.

    Make sure that you do not drag a tab slightly downwards in the browser window by clicking.
    The current versions of Firefox have a feature called tabs.
    You can detach a tab in the current window and open in a new window by dragging a tab in the browser window.
    You can also do this via the context menu of a tab: switch to the new window
    You can drag the tab to the tab bar in the original window to cancel this detachment.

    bug489729 (Disable detach and tear off tab):

  • Some Images open in a new window or tab are backwards or rotated 90 degrees,

    Some Images open in a new window or tab are backwards or rotates 90 degrees, but they appear in the correct position when you use Internet EXPLORER.

    I don't even know if it's a browser or a browser-server interaction problem. The problem manifests a certain user forums where members post jpg images that appear as thumbnails. "I can right-click and select"Open in new window"or open in a new tab. Either way some images open OK, some open pivot 90 degrees out of position sometimes upside down. If I use Internet EXPLORE the same images will open on the right side.

    computer: Dell Latitude
    OS: Windows 7 Pro
    Browsers: Firefox 41.02 / MSIE 11.0.9600.18059

    MysteryTech said

    Not in bold. Looks like this:
    Layout.CSS.image - orientation.enabled; true
    Status: default
    Boolean type

    Laughing out loud! But if I double-click on it replaces:
    Layout.CSS.image - orientation.enabled; false
    Set of users of status
    Boolean type

    Now when I right-click the image and select either "open in new tab" or "open in new window" the image is right-side up!
    

    Thanks to you all!

  • "Open link in new window" will not do anything.

    So, I had to reset Firefox to its default settings as a result of a search engine very persistent, and since I did, when I right click on a link and select 'Open in a new tab' or 'Open in a new window' nothing happens. Now I can just left click. And please, suggests not an app or a plug-in. He has done it before, I just want to do it now.

    Have you already installed extensions or themes in the new profile?

    If menus do not work then the most likely cause is an extension that is not working properly.

Maybe you are looking for