The flow of work, Servlet, popup and a managed Bean validation

Hello

We try to display a PDF file in a pop-up window by calling a Servlet in a JSF page using a workflow in JDeveloper 11 g R2.

The relevant part of JSF:
<af:inlineFrame id="if1" shortDesc="Report" source="/pdfservlet" styleClass="AFStretchWidth"></af:inlineFrame>
The /pdfservlet points to a Servlet with a method doGet as follows:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  response.reset();
  
  OutputStream out = response.getOutputStream();

  FacesContext context = this.getFacesContext(request, response);
  OracleReportBean bean =
    context.getApplication().evaluateExpressionGet(context, "#{reportBean}", OracleReportBean.class);

  bean.run(context, out);
  removeFacesContext();

  out.close();
}
The Servlet is trying to get the FacesContext, but we met with the following exception:
Caused By: javax.faces.FacesException: Cant instantiate class: oracle.adfinternal.view.faces.component.AdfViewRoot.
We have removed the following lines to the getFacesContext() method:
UIViewRoot view = facesContext.getApplication().getViewHandler().createView(facesContext, "");
facesContext.setViewRoot(view);
This avoids the exception above, however... We try to get the settings of the form that was submitted. Here is an example of the form element:
<h:inputHidden value="MyMedicationList_Report" id="system_REPORT_RESOURCE"/>
When the Servlet calls the Bean managed to retrieve the value, it uses:
Map<String, String[]> requestParameters = getRequestParameters();
Parameters p = getParameters();

for( String key : requestParameters.keySet() ) {
  for( String value : requestParameters.get( key ) ) {
    int i = key.indexOf( ':' );

    if( i >= 0 ) {
      key = key.substring( i + 1 );
    }

    p.put( key, value );
  }
}
Where getRequestParameters() tries to get the external context to retrieve the map of query parameter values:
return getExternalContext().getRequestParameterValuesMap();
The card is empty.

I tried after http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf by assigning the web.xml file:
  <!-- JspFilter must be configured before adfBindings. -->
  <filter-mapping>
    <filter-name>JpsFilter</filter-name>
    <servlet-name>PDFServlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>
  <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <servlet-name>PDFServlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>
And set the data bindings on:
  <pageMap>
    <page path="/pdfservlet" usageId="ca_bcpra_promis_reporting_view_PDFServletPageDef"/>
  </pageMap>
  <pageDefinitionUsages>
    <page id="ca_bcpra_promis_reporting_view_PDFServletPageDef" path="ca.bcpra.promis.reporting.view.PDFServletPageDef"/>
  </pageDefinitionUsages>
The Servlet is running, called the managed bean instantiated, but cannot read the query parameters.

Is the button used to start the workflow in a dialog box:
<af:commandButton text="Run Report" id="submitReport" useWindow="true"
                  windowEmbedStyle="inlineDocument" windowModalityType="applicationModal" windowHeight="500"
                  windowWidth="700" action="runReport"/>
By using a workflow, the user input are validated before the opening of the pop-up window. We want to keep this behavior. The PDF file opens and then returned with a NullPointerException:

http://pastebin.com/raw.php?i=PaM64jL4

The Servlet, through the managed bean, made a request to the report server to pass parameters and generate a PDF file. The PDF is sent to the browser via the Servlet.

What other steps can we take to:

1. send user and system parameters.
2. generate a PDF file on a remote server.
3 distribute the PDF file to the user in a pop-up window.

Thank you.

Here you go
https://www.EverNote.com/shard/S48//sh/ae8f58be-c4d3-4AB9-8F94-3e01d0e967d0/923ab115aca22fd1e2fccbf6321cbf09

Timo

Tags: Java

Similar Questions

  • What is the flow of work to prepare and sign a document with Acrobat DC when you're a signatory?

    I think it would be:

    1 convert the document to PDF

    2 Add fields of signature with "prepare the form."

    3. the signal under "Fill & Sign".

    4. send to others

    However this breaks down proceeds to step 2 or 3. After adding the signature fields and go to fill & sign, you don't get any options to sign. On the right, he said only: "you opened a PDF form. This form won't let you drag-and - d├⌐poser saves information. "There are two buttons for"Send & Track"and"To get others in the sign", but not a 'Sign This Myself" or similar.

    Yes, it works with Acrobat XI. It is not compatible with the latest version of Acrobat DC.

  • How far is the flow of work &amp; GUI in 10 pre pre 8?

    In fact, I'm not sure that I ask in the right place - is equivalent to "Discussion" "Forum"? It's been a while since I've posted in the forum and things have changed a lot. I seem to be going round in circles. (You know you're in trouble when you know not even how to use the help forum :).

    My one question became two when I tried to use this forum.

    (1) how close is the flow of work & GUI in 10 pre pre 8? A PrE8 manual would be very helpful for PrE10? (Note: the latest version, I have worked with is pre 2 so I should know the basics.) I'm just learning where everything is now).

    (2) I would like to read all of the questions in the forum, but all I can see are securities under "a trend of issues." Is it the way it is now? I would like to extend the question list so I can read the first few sentences - is there a way to do? I used to learn a lot by reading the forums, but only titles are not very useful.

    First of all, you're in the right place - Discussions are the Forum. Now, if you do not see the wires themselves, you're probably in the preview mode. Just click on one of those and if playback, search the debates of the elements of the first and click on this hyperlink. You should then see all the threads of Discussion.

    Regarding countries 8 vs pre 10, they'll be close enough. Although there are a few changes with pre 10 (for most things like more project Presets, etc), the general course will be almost identical. Some operations may take their "button" in a slightly different place and with a little, the syntax might have changed. In general, things pretty much always works the same way. All the main concepts NLE (of Non-linear editing) will always be applied.

    Today, Steve Grisetti, our tireless MOD here, has a book of pre 10 updated through Muvipix.com, and it has been updated for the new program, pre 10, so what it will cover what changes little there.

    Good luck

    Hunt

  • iOS block report because of the third-party application, I answered and they managed remotely on the computer, now I know it's a scam, I turned off and reset the password, I'm in the clear?

    iOS block report because of the third-party application, I answered and they managed remotely on the computer, now I know it's a scam, I turned off and reset the password, I'm in the clear?

    If you allowed anyone remote access to your computer (and you're talking about a computer since you mentioned iOS which is the OS for iDevices; computers run on Mac OS X), while no one knows what they were able to install. Assume the worst and:

    Notify your credit card company / bank of potential fraud

    Change your bank accounts and report your fly/fraud credit card

    Change all of your passwords

    And, finally, erase your entire hard drive and reinstall the OS from scratch using recovery or your original installation disks.

  • HP-15-af114AU: control keys for brightness (function keys) on the keyboard does work more (f2 and f3)

    Key (F2 and F3) brightness has stopped working suddenly

    I use the laptop HP 15-af114AU (AMD A8 Processor). Running on Windows 10-64 bit

    Its been only 2 weeks, I bought. The brightness of key i, e, f2 and f3 were working, then after a few days, I noticed it wasn't.
    I tried to do it manually through the brightness on the settings option, although there was no change.
    From the moment I bought this laptop, I downloaded SKYPE, Chrome and some THEMES for google Chrome.
    All other funtion keys work except these.
    Please help me with this problem.

    Hello

    Try the following.

    Download the AMD HD graphical installer on the following link and save it in your downloads folder.

    http://ftp.HP.com/pub/SoftPaq/sp74501-75000/sp74716.exe

    One when you're done, open your download folder, click with the right button on the setup of the AMD graphics card and select "Run as Administrator" to launch the installation.

    When this is finished, stop the laptop.

    Disconnect the power adapter and remove the battery.  Press and hold the Power button for 30 seconds.  Reinsert the battery and plug in the AC adapter.

    Robinet tap away at the key esc that you start the computer to launch the Start Menu, and then select f10 to open the bios menu.  Press f9 to load the default values (sometimes it is f5, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Start Notepad and let Windows take over completely for a few minutes before checking.

    Kind regards

    DP - K

  • cannot get rid of the "removable disk" in "my computer" and "Device Manager", after incorrectly removing a USB flash drive

    I stupidly, twice - after using USB flash drives - just shot when he in fact without removing them properly. Now, they are listed at all times in my 'Device Manager' and in 'my computer '. I went into Device Manager and tried to uninstall them. It seemed to work but the next time I booted up Vista found drivers and now they are back in 'my computer' and Device Manager. This does not seem to be a problem, but I would like to get rid of them.
    Joe

    Hi JoeZZ,

    Please see the following instructions on how to see the ghost devices:

    http://support.Microsoft.com/kb/315539/en-us?p=1

    I hope this helps!

    Debra
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Disable + Darken Background under the Popup to a managed Bean?

    I invoke a popup (Panel window) of a class of support as
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    callPopup.show(hints);
    But the background is not get clouded and the components of the page are still clickable... Unlike the declarative method where the background to get dark / disabled.

    Thank you
    < police = "courier" > (using Jdev 11 g R2, Fusion Web ADF) < / make >

    Hello
    If you use the dialog box or a window within a popup, you must set its Modal attribute to true.

  • 13.0.1 day saw upward tabs: when I opened a new tab nothing I enter in the address field work. Google and bookmarks work, but nothing to manually enter

    If I open a new tab, I can't enter any address at any site. Well, that I can enter, just at the moment where I hit return the address of the typewritten page disappears and returns to "go to a Web site. Nothing happens. I can use the search box (google) or a bookmark to open a new tab. This tab resulting will be then to accept the entrance and go to the address as I type. The new tab will not do anything.

    Try to open a new window (file > new window) to see if it works.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).

    This can also be a problem with the places.sqlite file that stores the bookmarks and history.

    You can also try to repair the database of places with this extension:

  • The NI9423 will work with Sound and Vibration VI

    Will be that the NI 9423 mounted on a chassis cRIO work with the NO audio and vibration of VI?

    I have an optical encoder of 10-30 V 100 pulses/revolution and would like to make angle field order analysis with her.

    is the NI9423 a card appropriate for this purpose or is something else better suited, I'm open to change the type of encoder if necessary.

    Hi Bodger

    How fast do you think the tree to turn to? The speed of switching module is able to pass to the 1uS extremely quickly. This means that you should be fine unless you are turning the tree at a ridiculously fast speed of approximately 600000 RPM.

    Regarding the reading of signals with the sound and vibration screw, you should be able to do this using the digital tachometer functions.

    Thank you very much

    Dan.H

    NIUK Applications Engineering

  • How to get the nfc for work with a7 and samsung galaxy s4

    I can't NFC to work on the new A7 with my Samsung Galaxy s4 - someone has these 2 devices and NFC works fine?  Or did you have to complete a fix to make it work?

    I discovered that the latest android update 4.3 with the samsung galaxy s4 has created problems with nfc communications - a lot of programs that use the nfc no longer works with this new update.  I was told by samsung today that there is a known issue and they are working on it.

  • The mouse stops working but left and right buttons still work.

    I'm having a problem with my mouse, the cursor will stop working, but all buttons still work. I tried another mouse, uninstall and reinstall the mouse driver updated and change USB ports, so it is not automatically turned off. Nothing works I found so far.

    I found something here: http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/windows-7-64-bit-mouse-pointer-not-moving-but/fc581ad9-87ac-410e-a7ae-55ffcf626f03?db=5

  • How does the file access work between Mac and VM

    Hi I am a new user to the Fusion of the VM. I have a new Mac, and I loaded Fusion of VM, some Serif desiging websites software and Vista. So, how to file access works between the Mac and the VM? All my files are on my hard drive to the Mac. I am ready to use the Serif software to make changes to my site, but how do I access files? Can they stay on the Mac and be shared - how do for them? Or transfer them to my hard drive to the VM?

    Thank you.

    Can connect the guest in an operating system file system Virtual Machine as if it was another physical Machine on the LAN once properly configured at the level of the BONE in both operating systems using industry Standard SBM/CIFS shares and has nothing to do with VMware Fusion provides in itself that the Virtual Machine has a virtual network adapter connected.  No matter if it is set to bridged, NAT. (default) or host-only because you can communicate between the host and the guest with any of them.

    The other option is to use VMware shared folders and or files in reverse.  While the second is a nice feature, it is problematic during the installation/uninstallation of some software in Windows Welcome and my need to be disabled mirrored folders for installs it / uninstalls and then reactivated.  To understand the issue take a look on note them it applies more so what is there in the if APPLIES to Microsoft KB Article below: article.  Take a look at you receive an "Error 1606" error message when you try to install or remove a program from Microsoft if the files in reverse are or have been activated and you get an Error 1606.

    In addition to the files shared VMware and or files in reverse, you can also drag and drop files between the host and the display of the Virtual Machine, for example from office to office.  Note: All of these VMware features require the VMware Tools installed in the supported host operating systems.

    Or of course, you can move the file system of the client files if you wish.

  • automatic control in the flow of work flow

    Hello

    I use jdev 11.1.2.2.0

    I have a workflow with 3 pages (p1, p2, p3). each page wil have an output text.

    My requirement is with out having more buttons command or something... Firstly it must view page1, then after 10 seconds it should go to page 2 automatically
    then, after 10 sec, he should go to page 3

    Thanks in advance
    RAK-

    You can put an af:poll to page 1 and page 2 component that you initialize with the amount of time you want to wait (10 sec). After 10 seconds, the pollListener is called. This listener is implemented in a bean that queue of an event on a hidden button (or navigation directly). The button is hidden on the page but it goes to the second page. Here, do you the same thing.

    Timo

  • problem on the flow of tasks of adf and dynamic region

    JDeveloper 11.1.1.5

    I created a page jspx for making fun of the home page.

    In the facet of the beginning, there are 2 Ref order link in the region (for the 2 workflow)
    In the facet of the Center, there is a dynamic region. Once you click on the order link, the region will be changed.

    The problem is:

    the workflow has 3 displays (View1-> 2-> the View3), if I run mode 2, when I click on the link even in the facet of the beginning, it does not refer to the View1.

    I want the page back to View1 when I click the link, how can I apply?

    Hello

    You must reload the region to start again. To do this, you can assign to the refreshCondition for connection of the region, in such a way that when it is resolved to true, the region will be reset. No doubt, you can add a parameter to the region and set its value through setActionListener for the click on the link.

    Check this: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/taskflows_regions.htm#CHDEIFBB

    Arun-

  • Guide to the flow of WORK in APPROVAL.

    Hello

    I'm trying to understand the workflow approval IN. and looking for any documentation as the PO approval workflow user's guide.

    Advanced thank you for your help!

    Thank you
    Malla

    Published by: user12001627 on June 15, 2011 12:54

    Oracle Applications 11i/R12 documentation can be found on - http://www.oracle.com/technetwork/documentation/applications-167706.html

    In addition, please see if these documents help.

    FAQ: Email feature IN. (provider Notifications) [ID 307577.1]
    FAQ: Document approval Manager [ID 210493.1]
    How to diagnose no found approver (Document status remains incomplete with no Action taken) and build failures list default approval workflow purchase approval [ID 295153.1]

    Thank you
    Hussein

Maybe you are looking for

  • Photoshop CC15 OS Sierra problem

    Given that I've updated my MBP mid-2014 the ALT KEY does not work in Photoshop. It is almost impossible using the tool clone with the ALT key. I have tried both (left and right alt key) they have acted similarly. I configured a button on my wacom wit

  • NFC problem

    Hello I tried the nfc sharing compact z3 to z3 compact and it did not work at once, Lea it doesent even turn on bluetooth when it needs to transfer the file. Both phones discovered each other, but when I select content to share it starts a bit to wor

  • purchased iTunes songs to Windows Media Player conversion

    Yes 101 posted a solution Tuesday, July 7, 2009 18:40. I followed the steps but when I get to step 8 and enter the advanced area there is no box or button to create MP3 files. Is there is now a new thing or how to convert? Thank you

  • Could not open the page (drivers Probook 4530 s)

    I don't know if I'm posting this int the right section, but it's extremely annoying. I can't access the Probook 4530 s support with the drivers page, it gives me this message: Could not open page The service or the information requested is not availa

  • VISTA anti-virus

    I bought Vista anti-virus and it is mucking my computer (I have no Appsdata now!).I downloaded a bogus program.  It works, but I constantly get pop ups on allow a program to run from my Appsdata\av.exe (which I can't find it) and "no authorization".