manipulate the outputmode by a listener somewhere?

I want to open a new page in printmode immediately. At the moment I open the page in the onload I click a commandlink making < af:showPrintablePageBehavior / > but it's ugly as hell, because I'm not able to close the first window, I opened with javascript, so that the user ends up with 2 pages showing the same data. When the open first page is printed half the data is left out so I need the printable outputmode but I don't want the window between the two.

I can solve it any other way?

Hello

I implemented this in a test case. You can simplify it a little bit

-as previously, you configure the config.xml file - trinidad

#{PrintableBehavior.outcomeMode}

-You create two controlled beans

  
    PrintPageBean
    adf.sample.view.PrintPageBean
    request
    
      printableBehavior
      adf.sample.view.PrintableBehaviorBean
      #{PrintableBehavior}
    
  
  
    PrintableBehavior
    adf.sample.view.PrintableBehaviorBean
    request
  

Note that they are both scope, which means that the mode reset after accessing the print page

package adf.sample.view;

public class PrintableBehaviorBean {

    String outcomeMode = "default";

    public PrintableBehaviorBean() {
        super();
    }

    public void setOutcomeMode(String outcomeMode) {
        this.outcomeMode = outcomeMode;
    }

    public String getOutcomeMode() {
        return outcomeMode;
    }
}
package adf.sample.view;

public class PrintPageBean {

    PrintableBehaviorBean printableBehavior = null;

    public PrintPageBean() {
    }

    public String onPrint() {
        printableBehavior.setOutcomeMode("printable");
        return "print";
    }

    public void setPrintableBehavior(PrintableBehaviorBean printableBehavior) {
        this.printableBehavior = printableBehavior;
    }

    public PrintableBehaviorBean getPrintableBehavior() {
        return printableBehavior;
    }
}

Note how the onPrint method called from the navigation control affects the printable result until the navigation page is printable. You can check the result on the AdfFacesContext mode so that you are able to add a link back only when the page is displayed in the print mode (in which case it is invisible in default mode)

I think it's the softer and more robust solution

Frank

Frank

Tags: Java

Similar Questions

  • I have a problem with the content of spam. Somewhere in the Fox appeared script that's choking me audio spam. Every 30 minutes he's playing an audio clip that is malicious.

    Hello.
    I have a problem with the content of spam. Somewhere in the Fox appeared script that's choking me audio spam. Every 30 minutes he's playing an audio clip that is malicious. I can't find the settings as it eliminated. Now, I don't have any plug-ins and Add-ons strange that were not initially in the Fox, but the problem is there.
    I use the Fox years. The problem, he had 1.5 months after Fox cleaning. If the problem can't win, I'll be forced to give up the browser, and I wouldn't.

    Could test you mode without failure of Firefox? It is a standard diagnostic tool to disable some advanced features of Firefox and extensions. More info: questions to troubleshoot Firefox in Safe Mode.

    Does not work if Firefox: Hold down the SHIFT key when you start Firefox.

    If Firefox is running: You can restart Firefox in Mode safe mode using either:

    • button "3-bar" menu > "?" button > restart with disabled modules
    • Help menu > restart with disabled modules

    and OK reboot.

    Two scenarios: A small dialog box should appear. Click on 'Start mode safe' (not update).

    Any improvement?

    If the problem persists in Mode without failure, could reinstall you Firefox in this way:

    Clean reinstall it

    We use this name, but it isn't about deleting your settings, this is to ensure that the program, files are clean (not incompatible, corrupt or exotic code files). As described below, this process does not disrupt your existing settings. Don't uninstall NOT Firefox, that does not need.

    (1) download a fresh Installer for Firefox 38.0.5 of https://www.mozilla.org/firefox/all/ in an ideal location. (Scroll down your preferred language).

    (2) close Firefox (if applicable).

    (3) to rename the program folder, either:

    (Windows 64-bit folder names)

    C:\Program Files (x86)\Mozilla Firefox
    

    TO

    C:\Program Files (x86)\OldFirefox
    

    (Windows 32-bit folder names)

    C:\Program Files\Mozilla Firefox
    

    TO

    C:\Program Files\OldFirefox
    

    (4) run the installer you downloaded in the #1. It should automatically connect to your existing settings.

    Any improvement?

    Note: Some plugins can only exist in this OldFirefox file. If it is missing something essential, present in these files:

    • \OldFirefox\Plugins
    • \OldFirefox\browser\plugins
  • What I really join the music Apple to listen to the music I want to listen to?

    What I really join the music Apple to listen to the music I want to hear?

    # You can buy your own music without subscription (Apple's music).

  • Manipulate the menu refnum

    Is it possible to manipulate the paths menu item in the same way that you can manipulate the paths?  With the files, you can build paths and trails band will get where you want to go, but I don't see any way to do with menus.

    I have an application that dynamically generates the menus.  When a user selects a menu item, I want to give him a check, but I want to uncheck all the other menu items that are in the same submenu.  If the menu items are fixed, it's not a problem, but if the menu items are dynamic, I'm having a devil of a time.

    I solved my problem.  I had a typo in very stupid that I didn't notice.

  • In Windows 7 we select several lines of data that are in a different location on the page (no continuous lines) through the mouse or keyboard and also can we copy all lines of these different at the same time to paste somewhere else in one fell swoop.

    > Now I'm unlable to select more number of lines that are not a sequence in a single page to copy the data rows and paste somewhere in one fell swoop.
    > Is this concept implemented in Windows 7. ?
    > Is there a provision (method) to select several lines that are not continuous across the keyboard or the mouse in windows 7?

    Byagaris,
    It depends on what program you are trying to copy and paste into.  You are able to select continuous, multiple lines, by using the Ctrl Key and clicking, or by highlighting the desired line.  For example, I held the Ctrl key and then, using the mouse, has highlighted several different phrases in the various paragraphs, and could then copy them.  This feature is available for several versions of windows.
    If you are not able to perform this action then post what happens when you try and what program you try it.
    Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can I change the command to "start listening" in Windows Reconition of discourse and change it to 'computer '.

    How can I change the command to "start listening" in Windows Reconition of discourse and change it to 'Computer' like in Star Trek?

    I tried to change it by a macro, but it does not work, please help.
    Karl

    Hello

    Unfortunately, you cannot change the Windows speech recognition commands. It is by default. Click on the link below.

    Common commands in speech recognition

    http://Windows.Microsoft.com/en-us/Windows7/common-commands-in-speech-recognition

  • How to manipulate the apex error to avoid lost database updates?

    Hello


    I'm looking for a way to manipulate the user error message hostile apex to avoid lost database updates. It seems that the message to the error handling function is not routed.


    Any ideas?


    THX.

    Gerd

    Hello

    Try the APEX error code. DATA_HAS_CHANGED

    Kind regards

    Jari

  • I'm doing slideshows to music with an opening, I would switch to LR, but you cannot set the duration of each slide (in my case the score) based on listening to the music. (In the opening by clicking on the "stopwatch" and pressing enter at each change of

    I'm doing slideshows to music with an opening, I would switch to LR, but you cannot set the duration of each slide (in my case the score) based on listening to the music. (In the opening by clicking on the "stopwatch" and pressing enter at each change of image). Adobe staff question: can I expect to find this option in a future release?

    Hi Pcaubi,

    There is no such updates for the same from now.

    I suggest you to please put in a feature request to: Photoshop community customer family

    Kind regards

    Tanuj

  • Have set up my own domain and linked to my portfolio but I get an error message when I type the URL, y at - it somewhere I need to "publish" the site?

    Have set up my own domain and linked to my portfolio but I get an error message when I type the URL, y at - it somewhere I need to "publish" the site?

    To all those who have suffered from this problem of background, there is a "Publish" button down green...

  • Manipulate the graduations to get finer resolution labeled tick when you zoom in the graphs

    I have a need to achieve a more fine resolution of the tick labeled in my LineChart when I chose to zoom on a narrow of the chart area. It seems that JavaFX has no support to allow the labelling on the scales, only of the graduations.

    I tried to manipulate the minorTickCount property, but it has the opposite effect of what I'm looking for. For example, to increase the number of minor counties does not reduce the distance between the points of major ticks in terms of value of the axis, and I see no obvious way to actually manipulate what should be the distance between the minor graduations / major in terms of value of the axis. This seems all managed by JavaFX, which is too rigid for my taste.

    I really need to find some sort of solution here, I can't have my axes basically get labeled when the zoom is pretty high for all main scale applies do not at all.

    Does anyone have any ideas? This value opens a feature request for--or already exist? I want to be able to manipulate these axes / ticks more than I currently seem to be able to.

    I have never tried to do something like that, but documentation of the API it seems that NumberAxis.setTickUnit (...) must realize what you need (it sets the distance, in units of the axis between the graduations main brands). You could link it to a dependent value upper and lower too, if necessary.

    Another option would be to subclass NumberAxis and override the calculateTickValues method, although it sounds like it might be difficult.

  • How have the Linux database server listener listen to the service in the Net of Windows XP Client Manager?

    People,

    Hello. I installed Oracle 11 GR 2 database server in the Oracle Linux 5 operating system.
    All customers (NetCA, DBCA, GROUND Deveoper, sqlplus...) works properly on the database server. The LISTENER_PT853 listener is listening on client tools under Linux successfully.


    I also installed Oracle database Client(SQL Developer, NetMgr, NetCA, sqlplus,...) in Windows XP. So that the client tools to connect to the database on Linux server, the listener in Linux must be tuned to the service in Windows XP.

    In Oracle Linux 5 Server Machine Net Manager:

    Service name: PT853
    Connection type: default database
    "TCP/IP Protocol".
    Host name: 192.168.196.102
    Port: 1521


    Listener: LISTENER_PT853
    Protocol: TCP/IP
    Host: 192.168.196.102
    Port: 1521


    I have test the Service PT853 with "SYS" username and password "SYS." The connection is successful.

    In the Windows XP Client computer, the information in the Net Manager is lower at:


    Service name: PT853_Linux
    Protocol: TCP/IP
    The host of the database Machine name: 192.168.196.102
    Port: 1521


    I test the connection by using "SYS" username and password "SYS" and got this error: ORA - 12514:TNS: listener does not currently of service requested in connect descriptor. There may be an error in the input fields or server may be ready to connect.


    Can I check the status of the listener in Linux Server machine as below:

    [user@localhost bin] $. / lsnrctl status LISTENER_PT853

    Its release: Service PT853 has 1 instance. PT853 of the Forum, State LOAN, has 1 handler for this service.


    Foregoing, we saw the listener in the Linux server machine only to listen to the PT853 service in Linux but not to listen to the service PT853_linux of the Windows XP client computer.

    Windows XP (192.168.196.101) and Linux (192.168.196.102) can ping each other successfully. So that client tools in Windows XP connection in Server database on Linux, the listener in Linux need to listen to on the service in Windows XP first.

    In Net Linux Manager, I add an address more (TCP/IP, 192.168.196.101, PORT 1521) to LISTENER_PT853, but gets the error.


    My question is:

    How have the Linux database server listener listen to the service in the Net of Windows XP Client Manager?


    Thanks in advance.

    UserAL1178M wrote:

    Hi you ave create listener.ora.

    Actually, no he didn't "need to create listner.ora.

    In fact, its problems stem from the fact that it * has * created one instead of letting some things by default.

    I give an example of my environment

    [oracle@home ~] $ cd /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/

    [oracle@home admin] $ cat listener.ora

    listener.ora # Network Configuration file: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

    # Generated by Oracle configuration tools.

    LISTENER =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = home.test.al))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = orcl.test.al)

    )

    )

    ADR_BASE_LISTENER = / home/oracle/app/oracle

    [oracle@home admin] $

    Change host, name of service depending on your environment. Your port is 1521.

    Then, first run all the listener and database startup. If you do the opposite, with that you will need to register the service change the order of system registry.

    Let me now if you need another sth

    Kind regards

  • manipulate the settings separate images?

    I am trying to copy a range of video and change the rates differently for each copy.

    For example, the first 10 frames are accelerated. Then a copy of the first 10 frames is slowed down. Then the next 10 frames are added.

    I think I find myself handling video outside the selection when I use timewarp, perhaps because it uses the original film.

    How would you suggest to independently manipulate copies of parts of the video?

    I just use avisynth where I manipulate ranges of frames separately as they were in the original. So, for example, if you lengthen the first 10 frames in the output to make it the length of 20 images, then to manipulate the next 10 images from the video source, the selection starts with 10 frame (the frame 11) to the place where he would be after the first extension. 11 No 21.

    Each entry of sequences in the project Panel has a series of In and Out points. Duplicate the footage item in the project Panel to create another instance with a different set of In and Out points, etc.

  • Is it possible to manipulate the property of the class implementation of an element?

    Hi all.

    Is it possible to manipulate the property of the class implementation of an element?

    Best regards, Luis... :) =

    This is an internal forms package. You can get the doc using Forms Builder (F1). See the FBean.Register_Bean () method.

    François

  • Collect the value of edittext box &amp; menu drop-down list to manipulate the project

    I built a simple GUI with a dropdown Panel and three boxes of edittext. I know not how to retrieve the values of each object to pass to the ASP (layers of text, project items). I'm still confussed on how to the onClick, onChange, onDeactivate, etc. methods work with functions... If I want to for example, to take the values in the boxes edittext to change values to text in a model layer, how could - I collect these values and pass them? In the sample code below it passes the default values for areas of edittext straight for layers of text in the model as soon as the GUI is launched...

    myGUI (this);

    function myGUI (thisObj) {}

    var myGUIPalette = myGUI_buildUI (thisObj);

    function myGUI_buildUI (thisObj) {}

    var myPanel = (thisObj instanceof Panel)? thisObj: new window ("palette", "user input panel', undefined, {resizable: true}");

    {//Build GUI

    res = "group {orientation:"column",-}".

    titleGroup: group {orientation: 'row', \}

    myStaticText: StaticText {text: 'Handset team word interludes'}, \

    },\

    textLineGroup: Panel {orientation: "column,"------}

    teamList:DropDownList {properties: {items: ['SORT CODES', '-', "ARI", "ATL", "BALL"]}}, \

    line01: EditText {}, \

    line02: EditText {}, \

    line03: EditText {}, \

    },\

    'ButtonGroup': group {orientation: 'row', \}

    clearButton: button {text: 'Clear'}, \

    renderButton: button {text: 'Making'}, \

    },\

    }";

    }

    myPanel.grp = myPanel.add (res);

    Default values

    var myPanel.grp.textLineGroup = textBox;

    textBox.teamList.selection = 0;

    textBox.line02.visible = false;

    textBox.line03.visible = false;

    var button = myPanel.grp.buttonGroup;

    var textBoxSize = (200, 20);

    var textBoxCharacters = 30;

    textBox.line01.size = textBoxSize;

    textBox.line01.characters = textBoxCharacters;

    textBox.line02.characters = textBoxCharacters;

    textBox.line03.characters = textBoxCharacters;

    Text box settings

    var defaultText01 = "enter the text of the line 01 ';

    var defaultText02 = "enter the text of the line 02."

    var defaultText03 = "enter line 03 Text."

    var myPanel.grp.textLineGroup = textBox;

    textBox.line01.text = defaultText01;

    textBox.line02.text = defaultText02;

    textBox.line03.text = defaultText03;

    textBox.line01.onActivate = function() {setTextBox (textBox.line01, defaultText01)};

    textBox.line02.onActivate = function() {setTextBox (textBox.line02, defaultText02)};

    textBox.line03.onActivate = function() {setTextBox (textBox.line03, defaultText03)};

    function setTextBox (activeTextBox, defaultText) {}

    if(activeTextBox.Text == DefaultText) {}

    activeTextBox.text = "";

    }

    activeTextBox.onDeactivate = function() {}

    If (activeTextBox.text == "") {}

    activeTextBox.text = defaultText;

    }

    ElseIf (activeTextBox == textBox.line01) {}

    textBox.line02.visible = true;

    }

    ElseIf (activeTextBox == textBox.line02) {}

    textBox.line03.visible = true;

    }

    };

    }

    var teamTri;

    textBox.teamList.onChange = function() {teamTri = textBox.teamList.selection};

    Settings button

    button.clearButton.onClick = function() {}

    textBox.line01.active = false;

    textBox.line02.active = false;

    textBox.line03.active = false;

    textBox.line02.visible = false;

    textBox.line03.visible = false;

    textBox.teamList.selection = 0;

    textBox.line01.text = defaultText01;

    textBox.line02.text = defaultText02;

    textBox.line03.text = defaultText03;

    }

    Manipulate the AE project

    ////////////////////////////////////

    ////////////////////////////////////

    #include "/ GFXM1/Script_Workflows/commonFunctions.jsx".

    var targetWidth;  Horizontal limit for altered text layers

    var modifiedLayers = new Array();

    numItems = app.project.items.length; collect the number of project items

    var teamLogosFolderMov = locateProjItems (FolderItem, "teamLogosMov");  Use CompItem to comps

    var teamLogosFolderRaster = locateProjItems (FolderItem, "teamLogosRaster");  Use CompItem to comps

    var teamLogosFolderVector = locateProjItems (FolderItem, "teamLogosVector");  Use CompItem to comps

    If (textBox.line03.text! = ' ': textBox.line03.text! = defaultText03) {}

    lineValue = textBox.line01.text + textBox.line02.text + "\r\n" + "\r\n", textBox.line03.text;

    }

    ElseIf (textBox.line02.text! = ' ': textBox.line02.text! = defaultText03) {}

    lineValue = textBox.line01.text + "\r\n" + textBox.line02.text;

    }

    else {lineValue = textBox.line01.text ;}

    for (c = 1; c < = numItems; c ++) {}

    model var = app.project.items [c];

    If (comp instanceof CompItem) {}

    for (i = 1; i < = comp.numLayers; i ++) {}

    {Switch (COMP. Layer (i). Name)}

    case 'textLines_GD ':

    targetWidth = 1720;

    setTextLayer_caseSensitive (comp.layer (i), lineValue);

    projectName = lineValue;

    If (scaleTextLayer (COMP. Layer (i), comp.layer (i).sourceRectAtTime(1,_true).width, targetWidth)) {}

    modifiedLayers.push (comp.layer (i));

    }

    break;

    case 'teamLogo_GD ':

    var numFolderItems = teamLogosFolderMov.numItems; Get the number of items in the folder teamLogos

    swapTeamLogo (numFolderItems, teamLogosFolderMov, teamTri, comp.layer (i));

    break;

    }

    }

    }

    }

    function swapTeamLogo (numFolderItems, teamLogosFolder, teamTri, layer) {}

    for (b = 1; b < = numFolderItems; b ++) {/ / loop in the teamLogos folder}

    If (teamLogosFolder.item (b) .name == teamTri) {/ / Check for game}

    layer.replaceSource (teamLogosFolder.item (b), true);  team swap in comp teamLogo logo

    }

    } //end check the teamLogos folder

    }

    ////////////////////////////////////

    ////////////////////////////////////

    Return myPanel;

    }

    If ((myGUIPalette! = null) & & (myGUIPalette instanceof window)) {}

    myGUIPalette.center ();

    myGUIPalette.show ();

    }

    }

    Hello, if your range variables are in the scope of your function (which is the case here) you need not pass them as arguments to your function.

    Then you can simply activate what wrote you in a function already and call on events, something like this:

    doIt() function

    {

    var

    targetWidth, numFolderItems, lineValue, ProjectName

    modifiedLayers = new Array(),

    numItems = app.project.items.length; collect the number of project items

    teamLogosFolderMov = locateProjItems (FolderItem, "teamLogosMov"), //Use CompItem for comps

    teamLogosFolderRaster = locateProjItems (FolderItem, "teamLogosRaster"), //Use CompItem for comps

    teamLogosFolderVector = locateProjItems (FolderItem, "teamLogosVector"), //Use CompItem for comps

    model,

    I, c;

    If (textBox.line03.text! = ' ': textBox.line03.text! = defaultText03) lineValue = textBox.line01.text + textBox.line02.text + "\r\n" + "\r\n", textBox.line03.text

    ElseIf (textBox.line02.text! = ' ': textBox.line02.text! = defaultText03) lineValue = textBox.line01.text + "\r\n" + textBox.line02.text

    else lineValue = textBox.line01.text;

    for (c = 1; c<= numitems;="" c++)="" if="" (="" (comp="app.project.item(c))" instanceof="">

    {

    for (i = 1; i<= comp.numlayers;="" i++)="">

    {

    case 'textLines_GD ':

    targetWidth = 1720;

    setTextLayer_caseSensitive (comp.layer (i), lineValue);

    projectName = lineValue;

    If (scaleTextLayer (COMP. Layer (i), comp.layer (i).sourceRectAtTime(1,_true).width, targetWidth)) modifiedLayers.push (comp.layer (i));

    break;

    case 'teamLogo_GD ':

    numFolderItems = teamLogosFolderMov.numItems; Get the number of items in the folder teamLogos

    swapTeamLogo (numFolderItems, teamLogosFolderMov, teamTri, comp.layer (i));

    break;

    default:;

    };

    };

    };

    myPanel.grp.buttonGroup.renderButton.onClick = needs;

    If instead you want to write a function that is independent from the UI variables, IE not dependent on variables of string, then you must pass these values as arguments:

    function must (text01 text02 text03, defaultText01, defaultText02, defaultText03)

    {

    same start

    get lineValue of arguments

    lineValue = text01; If (text02! = "" |) Text02! = defaultText02) {lineValue += "\r\n" + text02;}  If (text03! = "" |) Text03! = defaultText03) lineValue += "\r\n" + text03 ;} ;

    same end

    };

    myPanel.grp.buttonGroup.renderButton.onClick = function() {has (textBox.line01.text, textBox.line02.text, textBox.line03.text, defaultText01, defaultText02, defaultText03) ;};

    Note: I changed my computer var = app.project.items [c]; (does not work) to comp = app.project.item (c); and if (textBox.line02.text! = ' ' | textBox.line02.text! = defaultText03) (risky) if (textBox.line02.text! = ' ': textBox.line02.text! = defaultText03).

    Xavier.

  • Manipulate the shapes &amp; vectors with Expressions

    Hello

    Is it possible to manipulate the different vectors of a path or shape in After Effects using expressions? How one would call the individual vectors in the script of the expression? If not, are there other ways to draw and adjust the forms via expressions? Thank you

    -Saib

    As I said, you can't. The question here is, you actually want to animate the mask or shape layer paths? Most of which can be done easily with distorting (and much more intuitive, too) as Bézier or the puppet tool. So for me, you simply follow a bad strategy here...

    Mylenium

Maybe you are looking for