ADF showPrintablePageBehavior with action

Hello

I use successfully the component of ADF showPrintablePageBehavior inside a command button to display a printable version of an existing page. It is simple and works well:
<af:commandButton text="Print Me" id="cb1">
    <af:showPrintablePageBehavior/>
</af:commandButton>
If I understand the documentation that the addition of this element of a control commandButton to removes example any event button action server-side:
Note that the component of command will not be forwarded to an action on the server event (the event is canceled), but there will be a request to the server to get the printable page.
I have a specific use case where I want to call an action side server in addition to render the printable page. For example, let's say I want to know when a user has selected the print function (to check or update some State-side server to indicate that the page has been printed in fact).
I'm struggling to implement this scenario unfortunately.
I tried:
1. the element 'action' or 'actionListener"normal... faithful to documentation commandButton control, it does not - and should not work.

2. ask to another button on the page to complete the server-side function. When the user clicks on this button and the action side server was carried out, I tried to simulate a click on a button of a second button (hidden) on the page that contains the actual component showPrintablePageBehavior. Basically structured as follows:
<af:commandButton text="Print Me" id="cb1" action="#{backingBean.myAction}">
</af:commandButton>

<af:commandButton text="Hidden print" id="cb2" visible="false">
    <af:showPrintablePageBehavior/>
</af:commandButton>
Action server side (backingBean.myAction), I tried two ways to simulate the click on the "Print" button hidden in order to make the printable version:
1. queue a Java ActionEvent (hiddenPrintButton is "binding" on the bean with success):
 ActionEvent ae = new ActionEvent(hiddenPrintButton);
 ae.queue();
2 inject the Javascript to call the second button:
FacesContext fctx = FacesContext.getCurrentInstance();  
StringBuilder script = new StringBuilder();  
script.append(String.format("var hiddenPrintButton = AdfPage.PAGE.findComponentByAbsoluteId('%s');\n", hiddenPrintButton.getClientId()));
//script.append("??");  Logic for simulating a "click"
Service.getRenderKitService(fctx,ExtendedRenderKitService.class).addScript(fctx,script.toString()); 
In the 'logic to simulate a click', I tried different options (ActionEvent, AdfCustomEvent), but I can't seem to successfully simulate a click.

In the version of Java, the 'action' defined for the hidden print button is executed if I set one, but only that - I actually need the printing behavior must be executed.

Am I on the right track here... ? There may be a much easier way to achieve what I want? I unfortunately don't have a lot of experience of the ADF yet.

Thanks in advance for any comments or reviews.

Hello

see this example:

http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/11-client-listener-169135.PDF

What you need to do:

1. place an af:clientListener on the command button that launches the printable page
2. define an af:serverListener next to this command button and wire up to a bean managed on the server
3 write JavaScript to call the server listener (so the reference sample)
4. do not call 'Cancel' on the event function JS argument

This will allow you to send a notification on the server when the event is called

Frank

Tags: Java

Similar Questions

  • Export an ADF table with default column order

    Hello

    Jdev 11.1.1.5.0

    We have ADF Table with column drag and drop option. Also we have implemented ADF Table with excelHTMl type of export.

    Everything works as expected. Only problem is if we try to exchange a few columns by drag-and - drop option and then export the table, we receive the order of the columns with brewing. But our demand is, the user must obtain the export with the initial order table by default.

    It would be great, if you can suggest an idea to export the ADF table with default column order.

    Thanks in advance,

    MSR.

    I realized the required functionality. We can restore the default order of the columns to aid

       Function richeTableau = this.getFetchResultsTable ();
       Iterator rItr = rTable.getChildren () .iterator ();
       {while (rItr.hasNext ())}
           ((RichColumn) rItr.next ()).setDisplayIndex(-1);
       }

    Then we can call the real export help feature

       queue the event via a JavaScript inserted into the page
       FacesContext context = FacesContext.getCurrentInstance ();
       Erks = ExtendedRenderKitService
       Service.getService (context.getRenderKit (), ExtendedRenderKitService.class);
       erks.addScript (context, "customHandler()");
  • ADF security with identification details &amp; role of database table

    Dear experts,

    I have developed web applications by ADF with JDeveloper 12.1.3.0.0

    I want to apply the ADF security for authentication and authorization process.

    I mentioned several blogs that associated with example ADF security with the database table, but unfortunately I couldn't reach my task of them because all the blogs that make reference to the roles of username, passwords, and user to hardcode.

    In my web application, there are 3 database table (users, roles, User_Role).

    A user can have one or more roles.

    I was able to accomplish this task using spring-mvc + Hibernate + sprig security. Its code of even below.

    <>Authentication Manager

    <>authentication provider

    < jdbc-user-service data-source-ref = "dataSource".

    users by name of user-query =

    "username, password, enabled users to select where username =?"

    authorities-by-name of user-query =

    "" Select username, role of user_roles where username =? ". / >

    < / authentication provider >

    < / authentication manager >

    Pls guide me to solve this problem.

    Thank you

    Mauricette

    User, your question is not clear. You have implemented the safety with the spring? So, what's your question?

    The ADF security can be combined with a sql authentificator that reads users and roles of the DB tables. See Java / Oracle SOA blog: the use of tables of database as in WebLogic authentication provider and anything on the Fusion Middleware: Tables of database user to implement authentication in ADF and http://soadev.blogspot.de/2010/04/sqlauthenticator-simply-best.html.

    All of these solutions do not use users coded hard and rolls.

    Timo

  • Change the color of the text in several .psd with actions

    Is there a way to change the color of the text layers in several files in .psd (with a different text in each of them) with actions?

    All the files that I have to do that with are structured in the same way - background and above a layer of text.

    Here are the basics...

    #target photoshop;
    main();
    function main(){
    //select folder where PSDs are held
    var selectFolder = Folder.selectDialog( "Please select folder of PSDs");
    //if no folder selected quit.
    if(selectFolder == null) return;
    //get an array of all PSDs in the folder
    var fileList = selectFolder.getFiles("*.psd");
    //iterate through file list
    for(var a in fileList){
    var textColour = new SolidColor();
    textColour.rgb.hexValue = "00ff00"; //set colour to green
    open(fileList[a]);
    activeDocument.activeLayer = activeDocument.artLayers[0];  //Select top layer
    if(activeDocument.activeLayer.kind == LayerKind.TEXT){ //check if it is a text layer
    activeDocument.activeLayer.textItem.color = textColour; //set text to colour
    activeDocument.save(); //Save changes
    activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document
    }else{//not a text layer so close document
     activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document
     }
    }//end of filelist
    };
    
  • Duplicate a button with actions

    I'm new on board animate, but not for Adobe products.  I searched online for a response that would be relevant to my question, but so far without success.  Basically, I'm trying animate some hotspots on a map so that when you click on the button/rocker, he appears with a text box with some info in it.  I am reproducing this set upwards so that I can easily fill the card with my rocker and simply edit text in each box of different.

    The way I put it in place today is as described here:

    I have a "bearer of the image" with actions that tells it to PNG and open a text bubble.

    I have a "mouseover", "mouseout/mouseouthandler()" and an action of 'click '.

    I have the bubble of text and the text in a group, led to turn on and off when the button is clicked.

    I can provide more details if necessary.  I appreciate the help.

    Hello

    I searched and found 2 examples of old version. I've updated both. You can download the two examples by clicking on the links below.

    1) mobilebrowser_upgraded.zip - Box

    2) texasMap_upgraded.zip - Box

  • Problem of Windows with Action Scripts run from a Panel

    I created a panel that has shortcuts for Menu items and tools. I have also two buttons on my slab that run scripts that were created with Actions. I tested these two scripts with the ExtendScript Toolkit for both Mac and windows.

    Both scripts do not run on some computers in the window, but they do on others. It seems that the problem more with 7 of the window then in any other operating system, but it is not universal.

    I am at a loss on how to get hurt this problem. Machine window 7, I'm testing on runs the script without any problems, but some users of my panels have the problem above.

    Any ideas?

    Thanks in advance - Sam

    Action handler code looks like it's a step to play a shadow of action which lies in a defined action named SmileixPix.

    If you added that action shadow action value saved SmilePix the action defined and distributed the action defined in the package.

    If users have an action set SmilePix and you loaded the update action defined as a part of you install. Users can end up with two responsible actions named sets SmilePix one containing the action of the shadow and the other without the Sdade action.  I don't know what would happen if your panels has been used and there was a prior action set SmilePix which is not the action of the shadow.  Make sure that defective computers do not list Action Games named SmilePix twon

  • ADF taskflow with not get every page refresh

    Experts,

    We have created a portal WebCenter ADF application.  The ADF taskflow with 3 pages on this subject.

    1. first page includes a data control that uses a session bean method that calls an external Web service.

    2. second page has a feature to view the details of a record that is selected on the first page.

    3. third page has a function to download a file.


    The user navigates and downloads a file, we redirecting them to the first page where the control data must display the list of issues.  The problem is that after adding a new record, and his return to the control of data page (which is a list of records), the newly added drive does not appear.  The only way to view seems at this point to ask the user to shut down and log in to the system and reactivate the workflow.


    We have a phase listener to clean the cache, in the hope that it could solve the problem.  But it does not.


    Any ideas or advice on how to automatically refresh the data in control when the user navigates to this page?


    Thanks in advance.

    Sam.

    In the links page, verify all conditions of discount on the data control.

    Read also the understanding of the lifecycle Page Fusion (in particular article 19.2.1) and using ADF data binding in an Application of Web Java EE model (especially the Section 2.3.4)

  • CS6 stamp tool does not work with action / record (record of the tool is activated) other tools works

    CS6 stamp tool does not work with action / record (record of the tool is activated) other tools works

    At the same time recording tool was not possible and if you install Adobe Scriptlistener plugin Adobe will disable the recording of the tool its never an option.

    I use and record the actions all the time and was looking forward to the registration tool when Adobe announced it.  But I found what they delivered was very limited because of the restrictions. I don't like that Adobe disables the registration on my machine tool.

    The amount of data that gets reorganized also seems to vary between machines.  I found that Action recorded on a fast machine are not usable on a slow machine.  Recorder fast machine too much data.

    You use this action on the documents must also have the same size and resolution as the document that you have saved the action on. Quite a restriction.

    You can also be foxed in 2014 CC sett here Photoshop CS6 - recording of the clone in an action tool works incorrect on replay.

  • Mix ADF Faces with HTML, JavaScript, CSS, JSTL question

    Dear all,

    The project is now starting to deploy to the production server. When we try to deploy to the production server who made a lot of mistake. As this used widely used project mix ADF faces with
    HTML/JavaScript/CSS/JSTL. I would like to know what are the most error when we have mixed to use each one and how can we overcome them there?
    There is in the project

    1 mix of tags html with ADF Faces components
    2. the use of JavaScript/CSS inline
    3. mix the JSF/ADF Faces and JSTL tags

    Help me how to address this issues as well as links to useful blog.

    JDeveloper IDE version: 11.1.1.5.0 with Webcenter
    WebLogic version: 10.3



    Best regards
    KT

    Published by: KT on May 16, 2013 21:23

    Hello

    In addition to this project widely used mixture ADF faces with HTML, JavaScript, CSS, JSTL.

    JavaScript, CSS, and JSTL is not a problem, whereas - according to the JSF version - HTML is. JSF 2 is the first version of the JSF, which allows you to mix HTML with less side effects, if you use Facelets as view declaration language.

    I would like to know what are the most error when we have mixed to use each one and how can we overcome them there?

    There is in the project

    + 1. mixture of html with ADF Faces components tags +.

    This could ruin your pages, lead to update issues and - in case of frequent use in the trees - even destroy the functionality

    + 2. online use of JavaScript / CSS +.

    Poor performance because of heavy weight pages. If you were using ADF Faces and your JS addresses the DOM instead of the architecture of client cJavaScript ADF Faces then chances are JS will fail for the components that have changed their HTML output (which has an impact on the DOM structure) or changes are not submitted to the server.

    For CSS, CSS inlineStyle not applay to the DOM element that is external, which means for example af:input the background text color will color the lavel

    + 3. mix JSTL and JSF/ADF Faces tags +.

    Dependa on how you do. JSF has postponed EL syntax, which means that EL resolves at run time, whereas JSTL resolves at compile time. So the race conditions could become a problem

    Overall, it is difficult to say if things were coded wrong in the project (although for the use of HTML you can be sure) without seeing the code. It seems that the team that built the application however did not dare to the suite of recommended practices

    Frank

  • How to pre-fill the ADF form with the data?

    Hi guys,.

    I was wondering how you go about the generation of a pre-filled form of ADF. Is this something that is done if the designer of the ADF and the business objects? or do you create database tables stay and bind in the ADF and the workflow. Specifically, I want that if a user is presented with a several drop-down lists when the human task of the initiator is executed.

    Thank you
    Ross

    Hi Ross
    1. Yes, in all first place in the database, we added all the data manually for all research. Its our own schema custom. We plan to provide a few simple administration screens in a different WebApps to maintain these values to search. Note that it is a different simple ADF application, with a layer of EJB and EJB layer calling this and get/update database values.

    2. in ADDITION, we have a few search values we get from system/application totally another as Oracle EBS Suite. To do this, we have created custom schema. In this custom scheme, we have a few stored procedures created by the developers of EBS database (they are more familiar with EBS). Now in our EJB layer, we use architecture JPA, call these stored procedures and get all values for the search and display in the TaskDetails page. These values are maintained in EBS itself, so we have not all custom within our SOA/BPM project admin screens.

    In conclusion, our SOA/BPM applications, we have 2 databases. First database is for components SOA where we run RCU comand and there all SOA_INFRA, MDS, diagrams ORABAM etc. The second database is for our custom schema specific to our application. Here, we have our own lookup tables, custom table and all cutom stored procedures than coonect to external EBS etc. Weblogic console, we have just to create a data source for this second database and use layer JPA (persistence.xml file). For the first database, you already know that in the creation of the field itself, it will create all sources of data also.

    Thank you
    Ravi Jegga

  • Transparency with action script

    I have a swf file and I want to give a transparent background on the stage. I understand that it is possible to give it transparency through the HTML publish setting using the ' transparent windowless "property.
    However, I wanted to know if there is an actionscript property to give the same effect of transparency to the scene. like the opactiy or something (sorry, that I may be wrong)

    The thing is I have an external preloader that loads the swf content and when it is loaded, the stadium loses its transparency.
    any help please with action script on transparency?

    As mentioned, that there is no bottom in a loaded SWF file. Unless you EXPLICITLY put a layer in your document with a background on the subject, it is transparent. You can load SWF 500 inside another, you will never get a background of any of them.

    The sole purpose of context is if the original HTML wrapper was not established transparent windowless.

    Your problem is elsewhere, trust us. Look for something, a background of drawing in one of your movies, because something is without doubt.

  • Interpolation with action script + / from a fixed location

    I know the basics of the interpolation with action script, but I have a picture located in the center of the stage at x = 50.  With a click, I, move this photo - 10 x from this position if it will end the interpolation at 40.  A different button, I would make the oppositie, + 10 x to its current position and if it was at 40 you come back at the beginning and if it was at the beginning, it would be at age 60.

    Thank you

    You can use:

    prevTX.onRelease = function () {}

    this.useHandCursor = false;

    nextTX._visible = true;
    prevTX.enabled = false;
    nextTX.enabled = false;

    addition of the var: number = 100 + thTX._x;
    var myTween1:Tween = new Tween (thTX, "_x", Strong.easeOut, thTX._x, addition, 3, true);
    myTween1.onMotionFinished = function() {}

    prevTX.useHandCursor = true;
    prevTX.enabled = true;
    nextTX.enabled = true;

    }

    }

  • Fill the stage with Action Script

    Hello

    I'm new to flash and Action script. I would like to know how I could fill (instead of copy and paste) the scene with a small button e.g. 10 x 10 px. Let me explain what I'm trying to do here. It's a simple game that includes 4000 buttons, 50 lines of 80 buttons. Each button has States, not available, available and in the process. Visitors come to the page and start clicking, wins the one who has the most clicks.

    So instead of doing this with the painful copy and paste, to give the button a unique id, I was wondering if there is a way to do this with action script, generating 50 lines, 80 buttons per line, and each of them giving an id with j ++ or something.

    Thank you very much and sorry for my English.

    Of course, no problem actually. I would use two pieces of code. The first would be a
    class, which extends MovieClip and attached to your button element in the library.
    Then a little to the loop on the main timeline to attach buttons to the
    step and you're all set.

    For the class:

    class com.yourdomain.Sample extends MovieClip
    {
    var myID:Number;

    function Sample() {}

    public function set id(newID:Number):Void
    {
    myID = newID;
    this.onRelease = function() {}
    trace (this.) MyID);
    }
    }

    }

    Of course, you will need to change the com.yourdomain to your own class path.
    Then just put your clip in the library to export for ActionScript and set
    class: com.yourdomain.Sample

    In the main timeline then write a function createGrid bit as follows:

    function buildGrid (tot, sx, sy, pc, cs, rs) {}
    var startX = sx;
    var currX = startX;
    var startY = sy;
    perCol var = pc;
    var colSpace = cs;
    var rowSpace = rs;
    Use tot + 1 because we are not going to go 1-0 in the loop below
    var total = tot + 1;

    for (var i = 1; i)< total;="">
    Clip var = this.attachMovie ("btn", "btn" I, I + 10, {_x:currX,)
    _y:startY});
    clip.ID = i;
    currX += colSpace;
    If (I % perCol == 0) {}
    startY += rowSpace;
    currX = startX;
    }
    }
    }

    And call it:

    buildGrid (100, 20, 20, 10, 12, 12);

    This will make a grid of 100 occurrences of the element named "btn" (one with)
    your attached class), from 20,20 with 10 per line and 12 pixels
    between the centers... When you click on one any of them they will trace their
    appropriate index 1-100

    HTH

    --
    Dave-
    Developer leader
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • ADF GoLink with destination loses focus on taskflow

    Hello experts, I wrote WebCenter application portal in which I call ADF taskflow for one of the links on the main menu bar.

    In the ADF taskflow, I have a file download link with ADF GoLink destination pointing with option GET_FILe UCM content server.

    When I click on this link, the file must be downloaded.   But after that, the focus is completely lost power TaskFlow!

    When I click on anything on the page of the ADF, I get the error message saying "Due to inactivity, your session has expired out and is no longer active"!

    WebCenter version is 11.1.1.7

    JDeveloper is 11.1.1.1.6

    UCM is 11.1.1.7

    How do I avoid my session expired when I click on GoLink to download a file from the AAU?

    Can you please help me.     I even tried methods javascript inside the GoLink component for type = 'focus', type = 'blur' but useless because the blur method is not called as soon as I click on the attachment.

    Thank you for your great help.

    Hello

    do not use goLink. A goLing performs a GET request to quit the application (its like a link in HTML). Rather use an action of downloading files on a command button: af:fileDownloadActionListener

    Frank

  • Train ADF using with facet nodestamp

    Hello

    I use JDeveloper version 11.1.1.6

    I'm working on ADF Train component.

    I set the Train in sight which is used to stop Train. The code is as follows:
    <af:train value="#{controllerContext.currentViewPort.taskFlowContext.trainModel}" id="t12" var="trainNode"/>
    Above the line of code works very well. I have 3 train stops in my stream of Train. I want to perform processing when the click on the Train stop. I added the facet nodestamp with CommandNavigationItem as follows in all 3 views defined as the Train stops.
    <af:train value="#{controllerContext.currentViewPort.taskFlowContext.trainModel}" id="t12" var="trainNode">
            <f:facet name="nodeStamp">
                    <af:commandNavigationItem id="cni1" text="#{trainNode.label}" immediate="#{trainNode.immediate}" disabled="#{trainNode.disabled}"
                                                    visited="#{trainNode.visited}" actionListener="#{pageFlowScope.GroomRehomePreviewBean.processTrainStop}"/>
            </f:facet>
    </af:train>
    With the above code, I do not see the label to stop the Train and when I click on the Train stop, I encounter the error message saying, "javax.el.PropertyNotFoundException: the class 'oracle.adfinternal.controller.train.TrainStopModel' is not the property"label".»

    I would like to know how to use the facet nodeStamp with model Train of ADF.

    All entries would be useful.

    Thank you
    Ravi

    You are right. You have your trainModel related to an ActionListener - but don't forget that an ActionListener causes no navigation, the fact of only an action event. So, you should bind to the 'action' of the CommandNavigationItem property.

    action="#{trainNode.action}"
    

    .

    Best regards

    Nigel

Maybe you are looking for

  • G6 - 1045ej upgrad memory Pavilion

    Hello I have HP pavilion 1045ej with 2 slots for momery, 1 g6 with 4 GB, it comes to the computer: http://support.HP.com/us-en/document/c02735623 According to these data, I can't add another stick to upgrade the memory. in another page of hp, I can f

  • Show hidden files and folders option does not

    I'm trying to access a hidden folder, C:\programdata\... I can't see it in Explorer. When I go into control panel > folder options > discovers... the option box to display hidden files and folders is already selected. I tried to change this option to

  • I can not connect to windows.

    I can not connect to windows. I get the message "Windows user profile Service Service failed to load the connection user profile failed" any solution?

  • m475dn Auto CR after LF

    This printer has setting somewhere to support auto cr after lf?  We print reports from EAR (Reynolds) software and used to use lexmark printers who have supported it.  Now, we use HP m475dn color laser printers and they do not print the forms properl

  • BlackBerry can classic I get a sms delivered the report on the Passport?

    Hello world I need help for my new passport Blackberry: I don't know where or how I can get a 'good' failure sms. I mean of course it was received, I know that he has been sent. With my old BB bold 9780, curve 9300 and... I had this kind of sign "d"