Open popup from fragment through template

All,
I have some links in my page template and i want to open popups based on the click which are defined in separate page fragments. How do i achieve that ? Any sample example available for that ?
thnks
Jdev 11.1.1.5

Hi,
see sample 79 http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
Frank

Similar Messages

  • How to Open PopUp from Managed Bean?

    Hi,
    Can you please let me know how can we open a pop up from managed bean.
    Thanks & Regards,
    Kiran Konjeti

    Hi,
    I got the answer for this question.
    Write the following code in Managed Bean
    ==========================
    private RichOutputText errorText;
    private RichPopup PopUp;
    Generate accessors(setters & getters) for these 2 variablesAnd place this method in your managed bean.
    > private void showPopup(RichPopup popUp, UIComponent source) {
    > FacesContext context = FacesContext.getCurrentInstance();
    > String popupId = popUp.getClientId(context);
    > String alignId = source.getClientId(context);
    > StringBuilder script = new StringBuilder();
    > script.append("var popup = AdfPage.PAGE.findComponent('").append(popupId).append("'); ").append("if (!popup.isPopupVisible()) { ").append("var hints = {}; ").append("hints
    [AdfRichPopup.HINT_ALIGN_ID] = '").append(alignId).append("'; ").append("hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START; ").append("popup.show(hints);}");> ExtendedRenderKitService erks =
    > Service.getService(context.getRenderKit(),
    > ExtendedRenderKitService.class);
    > erks.addScript(context, script.toString());
    > }
    Now, how to call this method from your managed bean ... depends upon situation.
    public void sendEmailstoBorrowers(ActionEvent actionEvent) {
    .....................some logic ...............> if(true){
    > personHistoryStatus = defaultPreventionHelper.writeBorrowerHistory(borrowersList,getFormattedAction());
    > this.errorText.setValue((borrowersList != null ? borrowersList.size() : "")+" E-mails have been sent successfully..!");
    > }else{
    > this.errorText.setValue("Unable to send emails. Please contact System Administrator..!");
    > }
    > showPopup(this.getPopUp(), actionEvent.getComponent());
    }And ... what do we need to do on the UI??
    Write the following code in UI -- Here is the button which calls sendEmail method
    ==================================================
    ><af:commandButton text="SEND" id="cb3"
    >shortDesc="Click 'Send' to send emails."
    >styleClass="defaultButton"
    >blocking="true"
    >disabled="#{pageFlowScope.DefaultPreventMB.disablePrintButton || bindings.DelinquentBorrowersList.estimatedRowCount == 0}"
    >rendered="#{pageFlowScope.DefaultPreventMB.formattedAction eq 'E-mail'}"
    >partialTriggers="t2:dlDelete"
    >actionListener="#{pageFlowScope.DefaultPreventMB.sendEmailstoBorrowers}"/>
    Once this button get clicked ... it calls sendEmailstoBorrowers, and based on the result(either true or false) the method sets the content for the pop up and opens the popup from managed bean.
    And here is the code for which we have to keep inside the jsff and this gets invoked from managed bean.
    ><af:popup id="p1" binding="#{pageFlowScope.DefaultPreventMB.popUp}">
    > <af:dialog id="d1" type="ok" title="E-mail Communication Status">
    ><af:outputText value="E-mails have been sent successfully..!"
    > id="ot11"
    >binding="#{pageFlowScope.DefaultPreventMB.errorText}"/>
    ></af:dialog>
    ></af:popup>
    Let me know if you need more information about it.
    Thanks & Regards,
    Kiran Konjeti

  • Open popup from managed bean

    How can i open a popup from a managed bean function?
    Suppose i have an inputfield that is bound to a function getValue(), how can i open a specific popup from that function?

    Essential you have to put the popup somewhere on the page and you have to know the popup id (or search for it in the page). Then you call
         * Opens the RichPopup based on the key.
        public static void showPopup(String popupId)
            FacesContext context = FacesContext.getCurrentInstance();
            ExtendedRenderKitService extRenderKitSrvc =
                Service.getRenderKitService(context, ExtendedRenderKitService.class);
            extRenderKitSrvc.addScript(context,
                                       "AdfPage.PAGE.findComponent('" + popupId + "').show();");
        }with the popup id as parameter.
    Timo

  • Problem opening popup from jsf page....

    Hi to all....i have a problem, i'm trying to open a popup window using "outputLink".
    My code is:
    <h:outputLink value="#" onclick="window.open('#{appManager.basePath}/admin/selectCollection.jsf','','width=600, height=400, resizable=yes, fullscreen=no, menubar=no, toolbar=no, status=no, scrollbars=no, location=no')">
         <h:outputText value="#{bundle.selCollection}"> </h:outputText>
    </h:outputLink>
    The "window.open" works perfectly, but the parent window shows the page "Directory Listing For /" with the list of directories of my root project...
    What is the problem?

    try to use the popupFrame component of jenia4faces library (http://www.jenia.org).
    Is a good solution for popups problem

  • Open popup from JTable

    HI,
    I put checkbox in my last column in every row,
    When i click this open another JFrame,
    its work fine,
    But i changed JFrame to JPanel its not opened,
    whats the problem,
    Help me,
    Thanks in advance

    JPanel isn't a window in it's own right, it can only be shown as part of another window.

  • Error while opening a popup from managed bean

    Hi,
    I am trying to open a popup from bean, after another popup is closed. When I open the second popup either through ActionListener(on first popup button) or DialogListener(on first popup), I am getting the below error on browser status bar(!); and the second popup doesn't open. There is no error in the log.
    *'AdfPage.PAGE.findComponent(...)' is null or not an object.*
    Although the popup id is there on the jspx page.
    <af:popup id="confirmationStatus" binding="#{MyBean1.confirmationStatus}">
    <af:dialog cancelVisible="false"
    closeIconVisible="false" binding="#{MyBean1.d2}"
    title="Appointment Confirmation Status">
    <af:outputText value="Appointment is successfully confirmed"/>
    </af:dialog>
    </af:popup>
    public void confirmAppointment_dialogListener(DialogEvent dialogEvent) {
    FacesContext context = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service = Service.getRenderKitService(context, ExtendedRenderKitService.class);
    String popupId = "confirmationStatus";
    service.addScript(context,"AdfPage.PAGE.findComponent('" + popupId + "').show();");
    Please tell me why my popup is not getting open from the managed bean and I am getting an error in below line.
    service.addScript(context,"AdfPage.PAGE.findComponent('" + popupId + "').show();");

    To find out the right address of a component related to an other component, open your page select the component you want to add a partial trigger, go to the partial trigger property, select the down arrow at the right end and select 'Edit'. Now look for the popup in the component tree shown on the left side. When you have found the popup shuffle it the the selected side and click OK. The string you see in the field is the full address of the popup related to he component you've selected. Try the string you see there in your bean code. Remove the string from the partial trigger property, it's just to get the correct path.
    One other thing to check is that your popup has the ClientComponent property set to true.
    Next thing to try, is to use AdfPage.PAGE.findComponentByAbsoluteId(...)
    Timo

  • Opening an HTML popup from Flash, not as tab

    Hi
    I need to open an HTML popup from Flash (using ActionScript in
    Flex 4).
    Thus far I found a solution, and it does work in Safari - a new
    and separate HTML window is popped up (with a new web page).
    private function popUpTheHtmlEditor():void {
      var url:String = "http://www.adobe.com";
      var request:URLRequest = new URLRequest(url);
      try {
        navigateToURL(request, '_blank');
      } catch (e:Error) {
        trace("Error occurred!");
    But in (my) Firefox (with my settings), when I click on the Flash
    (Flex) button, the page is being opened in a new tab.
    I need a solution which pops up the HTML page in a new/separate
    window, as far as possible regardless of the browser (and browser
    settings).
    I found an example where a popup is opened from HTML, and it opens a
    separate window (a real popup) in my Firefox:
    http://www.gtalbot.org/FirefoxSection/Popup/PopupAndFirefox.html
    -> "Open a requested popup"
    The JavaScript code seems to be:
      OpenRequestedPopup(this.href, this.target); return false;
    with this function def:
      function OpenRequestedPopup(strUrl, strTarget)
        if (WindowObjectReferenceOfRequestedPopup == null || WindowObjectReferenceOfRequestedPopup.closed)
        WindowObjectReferenceOfRequestedPopup = window.open(strUrl, strTarget, "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",menubar,toolbar,location,resizable,scrollbars,status");
        else
        if(WindowObjectReferenceOfRequestedPopup.focus)
          WindowObjectReferenceOfRequestedPopup.focus();
    How could I call such code from ActionScript? Should this work through
    ExternalInterface? I couldn't even get this to work:
      ExternalInterface.call('alert', 'foo');
    Should I use swfobject.js for embedding the .swf in the HTML wrapper?
    Any other ideas?
    The two files are pasted below.
    Here's the compiler command I'm using:
      mxmlc -output button.swf -target-player 10.0.0 flash_to_editor.mxml
    I'm running the examples locally (as files, not over http). Would it
    help to place the files on a server?
    Tobi
    <?xml version="1.0" encoding="UTF-8"?>
    <mx:Application
      xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      horizontalAlign="center" verticalAlign="middle">
      <fx:Script>
        <![CDATA[
    import mx.controls.Alert;
    import flash.external.ExternalInterface;
    import flash.net.URLRequest;
    // This 'http://www.adobe.com' is just an example URL.
    // Works but opens tab in FF (not a separate window):
    private function popUpTheHtmlEditor():void {
      var url:String = "http://www.adobe.com";
      var request:URLRequest = new URLRequest(url);
      try {
        navigateToURL(request, '_blank');
      } catch (e:Error) {
        trace("Error occurred!");
    // Doesn't work:
    // var url:URLRequest = new URLRequest("javascript:alert('foo'); void(0);");
    // navigateToURL(url, "_self");
    // How to get this to work?
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('alert', 'foo');
    // How to get this to work?
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('launch','http://www.adobe.com');
      // Or
      // ExternalInterface.call("window.open", "http://www.adobe.com", "win", "height=200,width=300,toolbar=no,scrollbars=yes");
    // Perhaps it's necessary to try different approaches:
    // (As soon as I get two approaches to work.)
    private function popUpTheHtmlEditor():void {
      var s:String;
      if (ExternalInterface.available) {
        // Necessary? Safe?:
        // Security.allowDomain('*');
        s = ExternalInterface.call('launch','http://www.adobe.com');
      } else {
         // TODO: Then try URLRequest?
         s = "Wrapper not available";
      Alert.show(s);
        ]]>
      </fx:Script>
      <s:Panel title="One way to open the HTML editor"
      width="75%" height="75%">
        <s:Button id="button" label="Open the HTML editor"
        click="this.popUpTheHtmlEditor();"
        horizontalCenter="0" verticalCenter="0"/>
      </s:Panel>
    </mx:Application>
    <html
      xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="en" lang="en">
      <head>
        <title>html_around_swf.html</title>
        <script type="text/javascript">
    function launch(url) {
      alert(url);
      //  OpenWin = this.open(url, "FOO", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=400,height=200");
        </script>
      </head>
      <body>
        <object id="button" name="button" width="550" height="400"
        classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
          <param name="movie" value="button.swf" />
          <param name="allowScriptAccess" value="always" />
          <embed id="foo" name="button" src="button.swf" width="550" height="400"></embed>
        </object>
      </body>
    </html>

    Hi, 
    Here's a solution.
    1. Make ExternalInterface work when files are loaded as local files: 
    Go to
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htm l 
    In tab Global Security Settings: Edit Locations -> Add Location ->
    browse to the .swf file, add it. Make sure it's in the list (under the
    Edit Locations drop down, with a green check mark.) 
    Now open the HTML wrapper in a browser (eg Firefox). 
    Now this works (ActionScript): 
    private function popUpTheHtmlEditor():void {
      ExternalInterface.call('alert', 'foo');
    On Windows: perhaps:
    http://techjig.blogspot.com/2008/03/flash-global-security-settings-windows.html
    "In order for external interface functions to be called, you must also
    specify the folder/file where the swf file is located." 
    The above setup isn't necessary when the files are on a server. 
    Also see: 
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/External Interface.html#call()
    ""ExternalInterface" "
    "call() method" 
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ea6.html
    "About ExternalInterface API security in Flex" 
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf626ae-7fe8.html#WS2d b454920e96a9e51e63e3d11c0bf69084-7f31
    "Using the ExternalInterface API to access JavaScript" 
    2. Open a real popup: Example: 
    ActionScript: 
    private function popUpSomething():void {
      var editorPathOrUrl:String =
        'wrapper.html';
      var windowName:String =
        "SomeNameSeeDocs";
      var windowFeatures:String =
        "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,width=500,height=700";
      ExternalInterface.call(
        'launch',editorPathOrUrl,windowName,windowFeatures
    JavaScript: 
    function launch(editorPathOrUrl,windowName,windowFeatures) {
      windowRef = window.open(
        editorPathOrUrl,windowName,windowFeatures
    Works in all browser I tested except Opera. 
    Tobi

  • How to open a jspx in a popup from managed bean.

    Hello,
    I'm using Studio Edition Version 11.1.1.4.0.
    I have a JSPX that is to be used as an application monitor screen. So it contains 5 af:tables with plenty of columns & query search criteria. Each of the tables has context sensitive menus as well as double click functionality.
    When I write everything in a single JSPX, the code functions as expected. i.e. menu items & double click actions open new popups with requisite data. However, single JSPX becomes huge in size and hence difficult to maintain.
    When I transfer code to another JSPX, How do I call the new JSPX in a popup from the managed bean?
    Regards,
    Amar

    Try this:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/53-taskflow-in-popup-169196.pdf

  • Opening a popup from custom button in a Form

    I have a requirement to open a popup from a custom button of a portal form and once the value is selected from the popup the control should return to the main form with the value selected and set it to some display only field in that same form. It can be done thru' popup of a field directly but how can I do this thru'a button ?.
    Help would be appreciated.
    Thanks
    -Krishnamurthy

    Works for me if I middle-click a bookmark on the Bookmarks Toolbar and browser.tabs.loadBookmarksInBackground is set to true.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • New Document button to create/open document in Office Web Apps rather than through Template.doc in client's MS Word

    Greetings all,
    We have a particular campus with exceptionally limited access on their machines -- essentially, they can browse the web (access our Intranet) but not write information to drives or update their MS Word to read the new DocX format (or install plugins, etc,
    to do so).
    The new Web Apps seems to provide some potential for alleviating their issue -- but ideally, they would be able to originate (create) new documents right in Sharepoint by clicking on New -> Document and having the new document open in Office Web Apps
    rather than downloading / creating through Template.Doc (standard method in Sharepoint).
    Any ideas about how to make this kind of functionality happen?
    THanks!
    ---Dave

    When you mention "web apps" I assume you're referring to the new "Office web apps" in SharePoint 2010, so I'm not sure why this question is in a pre-sharepoint 2010 forum...  My answer entails how to go about doing this in 2010 only.
    In the document library's settings, go to advanced settings, and choose for the files to be forced to be opened in the browser, instead of the client software. 
    By default, you're only going to have a new word document for your "new" button.  You'll need to create content types for all the other document types you want them to be able to create.  So create a blank spreadsheet, and save it on your desktop,
    and create a blank powerpoint too. 
    Then create new content types at the top level of the site collection.  One called Excel Template, and one called PowerPoint template.  For each content type, click on the advanced settings and upload that blank file that you created. 
    In your document library, go to the library's advanced settings and change "allow mgmt of content types" to YES.  Then, in the content types section add those 2 new content types you created. 
    Now, when people click the "new" drop-down, they will have choices of a word document, excel and powerpoint, and they will open in the browser.
    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura
    Beginning SharePoint 2010: Building Business Solutions with SharePoint

  • How to imort opening balance through template of journal entry

    Dear Experts
    I want to import opening balance through the date transfer workbench  how can i do this ? is there any way to import opening balance in SAP ?
    Pls reply ASAP
    Regards
    Rajani P. Patel

    Dear Rajani P. Patel,
    You may check these threads first:
    Re: Uploading Opening Balances
    Re: Importing Opening Balances from Legacy System
    Thanks,
    Gordon

  • CS5 opening file from file server through explorer gets file not found error

    Hi There,
    Has anyone come across an issue with CS5 where they open an ai file through Windows Explorer and gets an error file not found after CS5 has started? Opening through CS5's file > open option does not produce the same error and seems to only error when opening by double clicking on the ai file. Is this a possible issue with shellex open handler registry key?
    Any help would be greatly appreciated.

    Opening files directly from the server can produce errors and damage files. It is generally not advised.
    http://kb2.adobe.com/cps/327/327749.html

  • Even though I have allowed popups from a certain site,when I try to open a dilaogue box a yellow line pops up that says firefox has blocked a popup. How can I change this??

    When I try to open the dialogue box on a website to see if there are any jobs available, firefix won't allow it
    "Firefox prevented this site from opening a pop up." is the message that pops up. I have gone into preferences to allow popups from this site. BUT it doesn't allow them.

    Turn off pop-up blocking, when the popup appears right-click within to find out what the actual site is.

  • How can i open the popup from java class

    Hi,
    Please tell me how can i open the popup from java class.
    I am using jdev 11.1.1.7.0
    I have used the below code which works fine in jdev 2.1 but it will have some errors in 11.1.1.7.0.
    Please tell me some way to do this in all jdev versions.
    Bean obj = (Bean)RequestContext.getCurrentInstance.getExternalContext.getPageFlowScope(“obj”);
    Code for hide pop-up
    FacesContext context = FacesContext.getCurrentInstance();
    String popupId = obj.getPopUpBind().getClientId()
    ExtendedRenderKitService service = Service.getRenderKitService(FacesContext.getCurrentInstance(),
    ExtendedRenderKitService.class);
    String hidePopup = "var popupObj=AdfPage.PAGE.findComponent('" + popupId +
    "'); popupObj.hide();";
    service.addScript(FacesContext.getCurrentInstance(), hidePopup);
    Code to Show pop-up
    StringBuffer showPopup = new StringBuffer();
    showPopup.append("var hints = new Object();");
    showPopup.append("var popupObj=AdfPage.PAGE.findComponent('" +
    obj.getPopUpBind().getClientId() + "');popupObj.show(hints);");
    service.addScript(FacesContext.getCurrentInstance(), showPopup.toString());
    Code need to be added in jsff pop tag
    binding="#{pageFlowScope.bean.popUpBind}
    Variable need to be added in Bean.java
    private RichPopup popUpBind;

    Hari,
    Since you're using a non-public build of JDeveloper, you should be using a non-public forum.
    John

  • How get runing total but opening balance pass from form through parameter

    Sir I have tow table in accbal have opening balance and in voudetail have daily transaction I need ledger report with opening balance
    My report get opening balance from accbal and get befor given date balance from voudetail
    Such as
    For opening balance
    Selelect case when dr>cr then dr-cr
    When cr>dr then cr-dr
    End opbal from accbal
    For get balance form daily transaction
    Select case when sum(debit)-sum(credit)> sum(credit)-sum(debit) then
    sum(debit)-sum(credit)
    when sum(credit)-sum(debit)>sum(debit)-sum(credit) then
    sum(credit)-sum(debit)
    end trbalance from voudetail
    where date <givendate
    cal acute both balance in variable
    total =opbal+trbal
    and send this total in report as opening balance on top of report and add this amount asper condition in amount report amount is debit and totalbal is debit then
    placeholdercolumn=totalbal+reportdebit
    or credit then
    placeholdercolumn=totalbal-reportdebit
    sir I need this type of calculation in report
    or
    if you give me idea n query is best for me I calculate with over function and use report only for output
    please sir give me idea urgent
    thank
    aamir

    Meilan (guest) wrote:
    : I wrote a Report called by a Form and pass a parameter from the
    : Form to the Report, successfully! But I imported a Graphic in
    : the Report, and the Graphic could not get the parameter...(the
    : parameter in the Report and Graphic should both pass from the
    : Form).
    : I call the Report by " Run_Product( REPORTS, :V_PRTNAME,
    : SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id,NULL); " in the Form.
    : and I imported the image from file for the Graphic in the
    Report.
    : Thanks for your help!
    Meilan,
    This forum is for Headstart related questions and experiences
    only. Please go to metalink.oracle.com to get more information on
    your problem.
    Regards,
    Ton
    null

Maybe you are looking for

  • Soritng in a report

    I have a report foo. I have to fields set to sort in foo, fields 1 and 2 and they are set to sort by 1 and 2 respectively. When I run the report on system 1 I get error failed to parse SQL query: ORA-06502: PL/SQL: numeric or value error: NULL index

  • Hi, I have a 13 inch mac book pro

    brought in feb this year I want to install windows on it as it works better for my work requirements can any one tell me how much this will cost and what is needed and if anyone has done it? thanks Marcel

  • If you buy your iphone outright in an apple retail store are they unlocked ?

    so I'm planning to go to the apple store in Sydney to buy myself an iPhone , but was just wondering if you buy the phone outright in store are they unlocked ?

  • IOS 4 website not opening

    Im running iOS4 on my ipod Touch 2G and some websites (webmail.eskom.co.za) doesn't want to open with safari, opens fine when using opera mini, problem is I'm using GW Web to open my work mail (Groupwise) and now I cannot do it anymore, I understand

  • ERROR: RUL-00025:fact class multiple inheritance not supported

    I am receiving this erro message when trying to invoke a rule (assert, execute ruleset,retrieve results) on a XML Fact structure that has demo element as parent with a ref to two child elements: invoice and po. I simply used the wizards to deploy the