After popup showPrintablePageBehavior the dialog box print browser

Is it possible to open the print browser dialog box after pressing a command button with showPrintablePageBehavior?

Joost

Hello

Yes, there is. However, before describing the solution: be aware that the code below uses a setting of internal application which may change in the future without notice. Not that expected still to do, its an implementation detail of the framework that I use.

Solution
======

1. on the label f: view of the page, create a method beforePhase to a managed bean reference
2. in the managed bean method (guess you named "beforePhaseMethod"), add the following code

import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
import org.apache.myfaces.trinidad.util.Service;

...

    public void beforePhaseMethod(PhaseEvent phaseEvent) {
        if (phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE){
            FacesContext fctx = FacesContext.getCurrentInstance();
            //use of internal request parameter, be aware of it
            Object showPrintableBehavior = fctx.getExternalContext().getRequestMap().get("oracle.adfinternal.view.faces.el.PrintablePage");

            if(showPrintableBehavior != null){
                if (Boolean.TRUE == showPrintableBehavior){
                  ExtendedRenderKitService erks = null;
                  erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
                  erks.addScript(fctx, "window.print();");

              }
            }

        }
    }

Frank

Tags: Java

Similar Questions

  • EXTREMELY low response to the dialog box print in CS4 (Win 7, 64-bit)

    I'm hunting a problem on the system from a friend...  It's a Q6700, 4 GB 2 TB hard drives, Epson R2880 running Windows 7, 64-bit.  CS4 is very energetic, runs great, open, close, edit, NO PROBLEM.

    Until you decide to print.  Once you hit the print selection it takes a MINIMUM of 40 seconds for the CS4 print dialog box appear.  If you then click the button "layout", it'll be at LEAST another 30 seconds until appears.  Once they are up, you can browse around and make changes, but once you press "print" on the dialog box, it'll be another 10-15 seconds before he answers and if you specify "Print preview" it'll be at least another 30 seconds

    until you get the preview.  Once it hits the printer, it prints very well.  There have not been any hardware or software changes in weeks, except for weekly updates from MS that settle.

    I tried pictures large and small pictures in case there was something of that CS4 was.  This process is it slow when you print a greeting card 4 x 6 or a 12 x 18 photograph.

    What is interesting, is that it is a new phenomenon...  It worked FINE until last week.  Then suddenly, the slow...  At the same time, the dialog box print ORDER SHOWING the ink LEVELS.  Status monitor always displays, but the printer dialog box is no longer made.

    I unloaded the printer and clean all the files I could find that seems to be associated with an Epson print driver.  Went to Epson and got later, Windows 7, 64-bit set of drivers and status monitor and installed.  No difference.  Also tried a new USB cable AND it has switched to the other port on the PC and the printer USB.  Nothing makes no difference...

    If necessary, I may have its CS4 re - install, but is there something that should be done before starting to demolish any worse, or major applications of the operating system?

    Do a printer driver generic default printer.

    If you do not, you can download it here: http://www.adobe.com/support/downloads/product.jsp?product=pdrv&platform=win

    Others have succeeded with Fax or default XPS Document Writer .

  • March 2011 the dialog box print Adobe recently becomes too big

    RECENTLY, possibly after agreeing an Adobe upgrade, I can no longer access the button 'ok' in the print dialog box. The box is too large to be completely visible.   What should I do to make things for the parameters I used a couple of weeks.  I made NO changes.  I've printed PDF files recently, cannot now.

    Thanks to a few simple, easy to follow help.

    Hello

    1. what upgrade Adobe do you have installed?

    2. not this problem only occurs when you try to print from Adobe?

    a. you can resize the dialog box by going into a corner and get the arrow to decrease the size of the dialog box.

    b. you can also change a smaller screen resolution to see if that helps.

    Check out the link:

    Change your screen resolution

    http://Windows.Microsoft.com/en-us/Windows7/change-your-screen-resolution

    c. also, you can use your scroll button and hold down the ctrl key at the same time. It changes your whole screen turned to more or less important.

    You can also visit the Adobe support links and check if it helps:

    Resolve PDF printing problems. Acrobat, Reader

    http://kb2.Adobe.com/CPS/873/cpsid_87346.html

    http://forums.Adobe.com/thread/391730

    Hope this information is useful.

  • can not get the color option in the dialog box print in snow leopard w/epson

    I upgraded to snow leopard and then updated

    my printer epson 595 driver. but when I go to print, the print dialog box print settings has no color option. It is grayed - out any of my old settings or type of paper I use.  called Epson and they had opened something in preview.  I have the color option, they say it's a prob of pshop.  any ideas?

    no color prob.jpg

    Well, for a 'proper' color workflow, when you choose Photoshop to manage colors (and select the correct destination profile) you are supposed to choose without color management in the Epson driver. (which is now indicated by the parameter of color being disabled... I guess) there are a number of sites that go through the steps of printing from Photoshop for an Epson, but I don't know if they have this covered new behavior.

    http://www.gballard.NET/NCA.html

    http://www.russellbrown.com/tips_tech.html

    http://www.computer-darkroom.com/ps12_colour/ps12_1.htm

  • How to remove the dialog box "print to file".

    Initially up to and subsequently, I get a dialog box titled 'Print to File' and invites me to enter a "output file name" How can I get rid of this box? No matter what I do, I keep coming back!

    Hi cups WI,

    ·         Since when are you facing this problem?

    ·         Have you checked the problem in safe mode?

    Check if the following might help.

    Step 1: Start the computer in safe mode and check the number.

    Step 2: In safe mode, delete the printer and spool driver files. To do this,

    a. Click Start, click my computer.

    b. navigate to the following locations and then delete all files and folders in the following two folders (where C: is the drive where Windows XP is installed):

    • C:\Windows\System32\Spool\Printers
    • C:\Windows\System32\Spool\Drivers\w32x86

    Report of the results.

  • "Save as Adobe PDF" missing from the dialog box print from Mac

    I've just upgraded to a new machine, and the "Save as Adobe PDF" option is missing in the PDF menu in the print dialog.  I'm on Mac OS 10.8.3 and SC 6.  I think that Acrobat X is supposed to automatically install this option in the main print dialog box; What can I do to get it installed if he stays out of the initial CS6 displays?

    I don't think that the Automator application is obsolete. It works for me on two computers that are running the latest version of Mac OS X 10.8.3 and Acrobat Pro XI. Maybe there is a problem with Acrobat X Pro and Mac OS X 10.8.3.

    You can try to uninstall Acrobat X Pro and reinstall to see if the Automator application works.

    Additionally, make sure that you update Acrobat X Pro to the last update.

  • Cannot resize the dialog box print too large

    When you try to print using Reader X, the print dialog box is huge and the 'OK' button extends above the bottom, making it inaccessible.  I tried to resize the print area, but the handles that appear around the edges will not adjust the size of the box.  In this case no matter the size of the player window with which I work.

    Someone else runs into this problem? No idea how to solve this problem?

    I use a screen resolution of 1024 x 768.

    Thank you.

    On computers with low resolution, such as 800 X 600, the print and Cancel buttons may be off the screen. The 10.1.3 free update for Reader and Acrobat addresses this issue. You can install this update automatically to in Reader and Acrobat. If you are unable to update at this time, do one of the following:

    • Drag the scroll bar on the right side of the print dialog box down to access keys.
    • To print, press enter or return.
    • To cancel, press ESC.

    This information has been made of article following the base of knowledge print issues. Acrobat, Reader 10.1.2 or later.

  • How to get the dialog box print forms 6.0.8.8.0 (6i)

    Hello

    I want to get a print dialog box when the button is pressed. For this I need to use win_api_dialog.select_printer that I found in the library of d2kwutil.pll.

    I created a simple form using Developer 6.0.8.8.0.
    I have attached the d2kwutil.pll lib

    I have the d2kwutil.pll in the directory where forms_path is pointing to in my registry.

    There is only a single block and a button on the form. Here is the code on the when button pulled the trigger

    declare
    vcPrinter varchar2 (200);
    vcPort varchar2 (200);
    Start
    win_api_dialog.select_printer (vcPrinter, vcPort, TRUE);
    : PRI. PRI_PRINTER: = vcPrinter;
    : PRI. PRI_PORT: = vcPort;
    end;

    When I run the form, the form compiles well but I
    FRM-40734 internal error PL/SQL ERROR OCCURRED.

    Can you please tell me what must I watch or even step by step instructions on how to get this working. ?

    Thank you
    Laba

    Hi Laba!

    Your form is not the d2kwut.dll, I think.
    Try to put in the \bin folder in your home of developer.

    Cordially and Pauline halla!

  • Adobe Acrobat Reader DC. In the dialog box print has no text

    are.png

    Hello

    This happens usually when the police Segoe UI are missing.

    Please visit the following link.

    Boxes of empty dialogue or missing text of GUI, Adobe Acrobat and Reader

    Concerning

    Sukrit diallo

  • A screen popup menu is opened after the closure of the dialog box

    Hello

    I have a test application with a screen containing a button.

    When I click on the button (pressing the button on my BlackBerry 9220 trackpad), it opens a dialog box.

    Then when I press ESC to my BlackBerry 9220, it closes the dialog box and I'm back on my screen.

    Now, if I add to my screen, a menu item, the changes in behavior:

    When I click on the button (pressing the button on my BlackBerry 9220 trackpad), it opens a dialog box.

    Then when I press ESC to my BlackBerry 9220, it closes the dialog box and opens a menu screen.

    So, I would add my item of menu but keeping the old behavior of my application after you close the dialog box.

    Any idea?

    Thank you.

    Best regards.

    Here is the code:

    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.ButtonField;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.MenuItem;
    Import net.rim.device.api.util.StringProvider;
    SerializableAttribute public class TestApplication extends UiApplication
    {
    public TestApplication()
    {
    this.pushScreen (new TestScreen());
    }
    Public Shared Sub main (String [] args)
    {
    Application TestApplication = new TestApplication();
    application.enterEventDispatcher ();
    }
    }
    final TestScreen class extends FieldChangeListener implements screen
    {
    public TestScreen()
    {
    / * MyMenuItem MenuItem = new MenuItem (new StringProvider ("my menu item"), 0 x 230000, 0); * /
    ButtonField myButtonField = new ButtonField ("button my field");
    myButtonField.setChangeListener (this);
    This.Add (myButtonField);
    / * this.addMenuItem (myMenuItem); * /
    }
    ' Public Sub fieldChanged (field field, int context)
    {
    Dialog.Alert ("test");
    }
    }

    Here are a few screenshots:

    It comes from the popup menu. create the button with CONSUME_CLICK would be the simplest solution.

  • After closing the dialog box screen, menu by default is displayed

    I have a simple program that consists of a screen and a button. When the button is clicked, it displays a dialog box in the button handler. Once the dialog box is closed, the parts of the menu are displayed. Very strange.

    Here's the code that displays the dialog box:

    public void fieldChanged( Field field, int context )
        {
            String label = "";
    
            if ( field instanceof ButtonField )
            {
                label = ((ButtonField)field).getLabel();
            }
    
            //if this was the login button, display the popup.
            if ( label.equalsIgnoreCase( "Login" ) )
            {
                String icon = "questionmark.png";
                Bitmap bitmap = Bitmap.getBitmapResource( icon );
                String [] options = new String [] { "Yes", "No", "Cancel" };
                int [] optionIndexes = new int [] { Dialog.YES, Dialog.NO, Dialog.CANCEL };
                Dialog dialog = new Dialog( "Select an option", options, optionIndexes, optionIndexes[2], bitmap );
                dialog.doModal();
    
            }
    
        }
    

    Once the dialog box is closed, this is:

    I have no idea why this show after the closure of the dialog box. Any ideas?

    Well done

    I think that many people would find answers to their questions if they tried harder with search.  And you find faster as well!  And whenver I creative search, I usually find something else useful that I was looking for.  Kind of like Google where you can go off on a complete tangent...

    In any case, can mark you this as resolved?  See you soon

  • Dialog box for browsing the channels DAQmx looks different on a PC without development of LV system

    Hello!

    When I browse for the physical channels or cDAQ from my development PC (Windows 7 64 bit, LabVIEW 2013), the following dialog box appears:

    This screenshot is the stand-alone executable. And the resulting string is: "cDAQ2Mod1 / ai0:2". Perfect.

    However, when I run the same executable on a machine that doesn't have a development system LabVIEW, but only runtime environment 2013 (automatically included with the Installer), the dialog box looks like this:

    "windows is tiny and not resizable, so he won't let not the user see the entire line, there no nice tree and the resulting string is: 'cDAQ9181-18B96FEMod1/ai0, cDAQ9181-18B96FEMod1/ai1, cDAQ9181-18B96FEMod1/ai2" which is much less readable than cDAQ9181-18B96FEMod1 / ai0:2.

    Apart from that, the apps work well.

    Is it possible to get the dialog box 1 on a PC running only the runtime environment?

    Thank you

    Baobob

    Support for Configuration DAQmx for MAX

  • Text truncated in the dialog boxes to print and export

    Someone has any idea how to correct the text in my dialog boxes print of InDesign and export? CS 5.5 on El Capitan

    I deleted all caches of fonts and it made no difference. Also on occasion, drop down menu police will show no previews of all the fonts, just all white.

    Thanks in advance.

    Darren

    Screen Shot 2015-11-09 at 8.29.42 AM.png

    Screen Shot 2015-11-09 at 8.03.42 AM.png

    Did you uninstall all fonts? Looks like the system font required may be missing.

    You can also try clearing the police puts in cache and replacing the prefs. For the latter, see replace your preferences

  • I'm trying to reduce the file size of a jpeg file, but the dialog box under image > image size reflects a much smaller that the file is. I saved the image after resampling and by reducing the size of the image, reduced the pip to 72 and lowered the qua

    I'm trying to reduce the file size of a jpeg file, but the dialog box under image > image size reflects a much smaller that the file is. I saved the image after resampling and simplistic image, the pip size reduced to 72 and lowered the low quality only to see the minimum file size reduction. Why the dialog box in photoshop gives me a different file size than my computer and how do I solve this problem? Thank you!

    The Image Size dialog box dialog box shows the uncompressed size.

    Your operating system (Explorer/Finder) shows the size compressed. (size on the disk)

    If you use save for Web, you can see the compressed size, but also an overview.

  • How to align the dialog box in the center of a popup programmatically

    Hey,.

    I use jdeveloper 11g release 2.

    Can someone help on how to align the dialog box programmatically a popup?

    Kind regards

    Steve

    Hello

    As far as I know, if we do not have indications of the dialog then displays on the center of the screen by default.

    This will solve your problem?

    Gud luck!

    HA

Maybe you are looking for

  • Satellite SP20-604: Modem problem

    Hi, I have big ploblem with my satellite and its modem, I instaled Windows XP home SP2, wheen, I try to connect to the internet, the modem answers "modem port used by another device, please check the device... Manager mpla mpla..." MPLA... I try to d

  • How to segment a network home security?

    My home network consists of an Airport Extreme and two base station Airport Express, run by my Mini OS X Server. I want to my network of the segment so that devices of questionable security (IP webcams, nest thermostat etc.) are separated from my pri

  • How to consolidate all to tabs in items 10

    How I can consolidatr all tabs in the elements

  • ASA5520 routing?

    I connected my asa5520 as: CAT6 (port Access)-> ASA5520 (outside) CAT6 (trunk port)-> (inside)-> vlan101 and vlan 102 Configure asa5520 as: interface GigabitEthernet0/0 nameif inside security-level 100 no ip address ! interface GigabitEthernet0/0,101

  • When I do Ctrl 'P' there is nothing in the queue

    When I try to print, I think that's not queue. The printer says that there is nothing in the queue?