Closing a popup

Hi All,
I have created a popup on jspx page. Popup will be called on click of richCommandLink.
ClientListenerSet set = richCommandLink.getClientListeners();
set.addBehavior("new AdfShowPopupBehavior('myPopup',AdfRichPopup.ALIGN_AFTER_END,null,'click')");
there are some buttons inside the popup which are also created dynamically.
RichCommandButton clb = new RichCommandButton();
clb = (RichCommandButton)RichCommandComponentUtils.addActionListener(clb,"#{RecommendationBean.actionButtonMethod}");
the actionlistener method is also getting called properly. But the popup is not getting closed. (Ideally it should get closed when the user clicks on any of the button inside it)
How is this case to be handled?
Regards,
ND
Edited by: ND on Oct 27, 2010 12:40 PM

Hi,
if you are on JDeveloper 11.1.1.3, get a handle to the RichPopup instace and call hide() on it when the button is pressed. Note that in this release you can also use Java to launch the popup so you don't have to add a client side showPopup behavior
Frank
Ps.: Note that AdfShowPopupBheavior is an internal class (http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e12046/oracle/adfinternal/view/js/behavior/AdfShowPopupBehavior.html) which we don't recommend using in custom applications. Esepecially for
opening a popup, there are enough options available using JDeveloper 11.1.1.3
Edited by: Frank Nimphius on Oct 28, 2010 8:29 AM

Similar Messages

  • Programmatically closing a popup from a managed bean

    Hi,
    in the following blog [http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/|http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/]
    the following statement is being made at the end ...
    The JavaScript call is issued as "window.exitPopup()" because the script is called from the page root. You can easily see how the JavaScript can be modified to have "exitPopup" becoming a generic function avoiding hard coded popup ID's as in my example.
    I don't understand how to avoid hardcoded popup ID's. Could someone please explain this to me.
    Thank you
    Bodhy

    Hi,
    thank you. It is working.
    @Timo
    The closePopup function in your comment has the variable popupId. That made me wonder, if it is possible to set this variable in my jspx page.
    I made a workaround by defining a new variable called popupId with getter and setter methods and using the setActionListener to set that popupId. After that I was calling the closePopup() function. Do you know a better way doing this?
    @Frank
    I was also reading through Frank's blog about JavaScript [http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/|http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/] , trying to find a solution to call JavaScript functions with variables (defining these variables in my jsp page). Is this possible?
    Thank you
    Bodhy

  • New feature in SP5: Closing a popup window raises an event

    I'm trying to use this new feature that came in SP5, "Popup Enhancement - Closing a popup window raises an event to the containing iView".  Can anyone give me an example of how this works?  In the configure element for the popup, there is a new field called, 'Closure Event'.  I though by adding by event to this new field, that the event will be raised after closing the popup window, but it didn't.  What am I doing wrong?

    Hi,
    you should add an end-point to the popup and/or use the "Close" action.
    there's a difference between when closing the popup implicitly or explicitly

  • How to Direct control to application's window after closing the popup?

    Hi,
    I am using 10.1.3. In my application I am unable to direct control to application's window after closing the popup, if I open any other window at the same time.
    For more info see the below step:-
    -> Open any popup in my application.
    -> Open any new window (lets say Google.com).
    -> Now restore popup on Google window.
    -> Now close popup
              - control goes to Google window but not the parent application window.
    How to direct control to the parent window?
    Can anybody help me regarding this?
    Thanx...Abhijit

    Hi Abhijit,
    You can do this using Javascript alone. Below are the two sample files I created.
    main.html_
    <html>
    <head>
      <title>Testing popup</title>
      <script type="text/javascript">
      function openPopup() {
        window.open("popup.html");
      </script>
    </head>
    <body>
      <a hr_ef="javascript:openPopup()">Open popup</a>
      <input id="something" name="something" type="text" value="something">
    </body>
    </html>
    Note: hr_ef should be href. The code tags are messing with the link.
    popup.html_
    <html>
    <head>
      <title>This is the popup window</title>
      <script type="text/javascript">
      function goToMain() {
        window.opener.something.focus();
      </script>
    </head>
    <body onunload="goToMain()">
      This is the popup window. Close this window to return to main window.
    </body>
    </html>The idea is to call a javascript function in the popup window that tries to focus on an object (eg. InputText) in the main html.
    Although, one point to take note is the naming of html objects by by these ADF UI Components. If you named your form id as "*form1*" and input text id as "*something*", your input text id will end up as "*form1:something*".
    Therefore, you will have to tweak the code above to the following:
    <script type="text/javascript">
    function goToMain() {
      window.opener.form1['form1:something'].focus();
    </script>Regards,
    Chan Kelwin

  • Refresh the table after closing the Popup iView

    Hi all,
    I have list of survey in my table. In that table i have toolbar button(DELETE) for deleting the survey. While deleting the survey it asks the confirmation. If we click Ok it delete the selected survey and close the popup also. what I want is I should refresh the table after closing the Popup.How can i achieve this?
    Help me in this regard.
    Thanks & Regards,
    Hemalatha J

    Hi Hema,
    Check this link.
    Visual Composer - You can do anything....
    In this blog, they are used 'Refresh' Button and a Hidden 'Plain text' message to solve this problem. If you are satisfy with this you can take this solution.
    Or you can try to trigger the 'Submit' action of 'Input form' once again from the 'Popup window' when the 'Delete' button is clicked.
    Hope it helps...
    Regards
    Basheer
    Edited by: Basheer on Dec 23, 2008 8:03 PM

  • Dynamic Action on "Get Focus" After Closing a Popup Window

    Hi,
    From one of APEX Application Pages I am calling a Popup Window where users can create a new record. In the Popup Window once the record is created and window is closed, I want to refresh the region on the main page to show the record created in the popup window.
    How do I create a dynamic action which will fire when the main APEX window gets the focus (after the popup window is closed). ?
    Any pointers will be greatly appreciated.
    Thanks & Regards,
    Ashish Agarwal
    http://www.asagarwal.com

    Assuming that you have a dynamic action in the parent page which refreshes the region
    <li> Make a note of the event which triggers your dynamic action, lets call this event A.
    <li> Create a JS function in parent page which triggers event A when called.
    For example if your Dynamic Action trigger is a button(id ="P100_REFRESH") press event
    Your JS function could be
    function Trigger_refreshRegion()
      $('#P100_REFRESH').click();
    The way in which you simulate the Dynamic action deoends on the firing event that you have used, so modify it appropriately.
    <li>Now in the pop up page, if you are closing the page in JS using smthing like window.close() or so,
    just call the parent page's refresh JS function there using the
      opener.Trigger_refreshRegion(); //whatever was the name of the function that you created.

  • Reg: Closing a popup from other DC

    Hi,
    I'm having a DC(operations). In the view of that DC operations im having a link, on action of that link i'm opening a popup. that popup window has a viewcontainer and inside which i have embeded another DC(createprc).
    The popup is getting opened. but when i try close it by using the button on createprc DC it not getting closed.
    I have created a method and event in the interface controller of the createprc DC and fired that method in on action of the button. in the method i have fired that event.
    and i have handled that event in cuctom controller of the operations DC and there i have written the code to close the popup.
    help me out with whre i'm going wrong and the detailed procedure..
    Thanks & Regards,
      Suresh

    Hi,
    you can done this with Server-side eventing.
    See  link:[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8d7cd90-0201-0010-4a8c-dd22fa16ca0a]
    or link:[/docs/DOC-8061#13 [original link is broken]]
    I hope this helps.
    kind regards
    Gnunter

  • How to invoke task flow navigation after closing inline popup?

    Using JDev 11.1.1.3; I have a commandButton that currently executes task flow navigation when pressed. I need however to invoke an inline popup from the button press before executing (conditionally) the task flow navigation. The Action setting on the button then needs to be removed, but it's not clear where to reinstate it. I have the button executing some managed bean code, which conditionally invokes the inline popup, and when the popup (contains af:dialog) is closed, I have some more managed bean code that determines whether the task flow navigation should occur or not. What I need to know is how to fire off the Action from the managed bean. Any suggestions?
    Thanks,

    1. To add to Timo's solution:
    you can call those code from DialogListener like:
    public void dLstnr(DialogEvent dle){
    if("ok".equalsIgnoreCase(dle.getOutcome().toString())){
    FacesContext context = FacesContext.getCurrentInstance();
    NavigationHandler nh = context.getApplication().getNavigationHandler();
    System.out.println("1");
    nh.handleNavigation(context, "", "go");
    2. As another solution:'
    you can have custom buttons and on one of then (say OK or Yes) you can call bean method like this as Action:
    public String actionMethod(){
    // DO YOUR LOGIC
    return "NEXT_TARGET";
    for Other button (say Cancel, NO) just close the popup.
    Amit

  • Howto refresh table after closing a popup

    Using JDev 11.1.1.3
    I have a table and a popup. The table is populated by records from a datacontrol.
    The popup has a form showing details of the selected record in the table. I also use that popup to create new records.
    I have problems when pressing the "OK" button on the dialog. The record is saved to the database, a commit has been executed but my table does not show the new record. I need to press F5 before i see the record.
    I have tried setting a partialTrigger to the table from the popup but that does not work.
    This is the dialogEvent code:
        public void enqueteListener(oracle.adf.view.rich.event.DialogEvent dialogEvent) {
           if(dialogEvent.getOutcome() != DialogEvent.Outcome.no) {
             BindingContainer bindings =  BindingContext.getCurrent().getCurrentBindingsEntry();
             OperationBinding operationBinding = bindings.getOperationBinding("Commit");
             operationBinding.execute();
             operationBinding = bindings.getOperationBinding("Execute");
             operationBinding.execute();
           else {
             BindingContainer bindings =  BindingContext.getCurrent().getCurrentBindingsEntry();
             OperationBinding operationBinding = bindings.getOperationBinding("Rollback");
             operationBinding.execute();
        }As you see the commit gets executed and after that i execute the Execute to refresh the table but it does not seem to work...
    How can i achieve that i do not longer need to press F5 so the record show up directly in the table after the OK button is clicked in the popup?

    Hi,
    you may add this helper method to your basking bean (or base backing bean)
    public void refreshUIComponent(UIComponent x) {
            AdfFacesContext.getCurrentInstance().addPartialTarget(x);
    }When using the addPartialTarget on your adf table component, it will refresh the table entirely.
    With the "fetching data....." message etc... (It is a bit heavy)
    What would be nice, is to refresh only the current row and not the whole table.
    How ?
    protected void refreshTableCurrentRow(RichTable xTable) {
            //Refresh Table UI Current Row
            Set<Object> selectedKeys = xTable.getSelectedRowKeys();
            assert selectedKeys.size() == 1;
            Object old = xTable.getRowKey();
            try {
                xTable.setRowKey(selectedKeys.iterator().next());
                List<UIComponent> colList = xTable.getChildren();
                Iterator iter = colList.iterator();
                while (iter.hasNext()) {
                    UIComponent col = (UIComponent)iter.next();
                    Iterator iterCol = col.getChildren().iterator();
                    while (iterCol.hasNext()) {
                        refreshUIComponent((UIComponent)iterCol.next());
            } finally {
                xTable.setRowKey(old);
        }And call it just after executing the "Execute" operation
    operationBinding = bindings.getOperationBinding("Execute");
    operationBinding.execute();
    refreshTableCurrentRow(getTable());
    Regards
    Nicolas

  • How to disable a commandbutton  from bean after closing a popup.

    Hi,
    I have a scenario where there is a popup with a button.On click of the button the popup must close and all the buttons in the parent page must be disabled.
    I tried the following to disable the button in the parent page:
    commandbutton1.setDisbled(true);
    AdfFacesContext.getCurrentInstance().addPartialTarget(commandbutton1);
    But it doesn't work.Am I missing something here ?
    Thanks!
    Rohit

    seems like the page is getting refreshed after your code..
    Try keepng the button used to close the popup as partialSubmit="True"

  • ComboBoxPopup - what listener is closing the popup?

    Hi,
    I am looking at the ComboBoxPopup...and I am trying to figure out which listener is causing the popup to be hidden when I click somewhere in the popup.
    I have modified the ScrollPane to use my own JPanel instead of a Jlist....so I know its not the list handlers..
    anyone have an idea?
    thanks

    In BasicComboPopup, look for this line:
    protected class ListMouseHandler extends MouseAdapter {
    "This listener hides the popup when the mouse is released in the list."
    Also,:
    protected class InvocationMouseHandler extends MouseAdapter {
    And in BasicComboBoxUI:
    public class FocusHandler implements FocusListener {
    The "setPopupVisible()" calls.

  • Closing the PopUp

    Dear Experts,
    I am calling a custom component as a pop up with table view.
    I want to close the popup when the user choose any row in the table .(no buttons)
    Searched forum.. though there are some posting.. I could not understand ..
    Can anyone please guide me .
    Regards,
    Roopas

    Hi,
    I think you can define an event when line is selected and in this link call the outbound plug of the window.
    Try to use the method set_on_close in your popup.
    Best regards,
    Caíque Escaler

  • When closing Popup Window it does not ask "discard data?" dialog

    We have a popup window to create/update a record. When we click on 'Close Window' on this popup window with unsaved changes it does NOT show the dialog popup - "The changes you have made to this page have not been saved. If you continue, the changes will be discarded. Do you wish to continue?"
    What do I need to do to ensure the dialog popup is shown so that the underlying VO/EO are left in a consistent state before closing the popup window?
    At the moment, if the user navigates to the popup window a second time in the same session the EO cache is retained and causes create to fail.
    Regards
    Firoz

    The message you are talking about is a Warn About Changes message and it shows only if the user tries to navigate away from the page page without committing/rollbacking the data.
    As far as Window close is concerned check whether the windows.close() could be handled using Javascripts. As far as OA framework is concerned I would recommend you do not retain the AM while the pop up window is opened. This way no data from previous popup would be available. Just make sure that you pass sufficient parameters to initialize the popup everytime.
    Regards

  • Popup crashes (hangs up) when second popup closed

    Hi experts,
    I've got a weird behaviour...
    After opening and closing a second popup (P2) in a popup (P1) (e.g. P2 = F4-help for a field of P1), P1 crashes/hangs up. Even within standard component like SALV_WD_TABLE.
    Weird thing is, that this only occurs on the test-system, not on the development-system.
    Do you have any idea?
    Thanks all..
    ismail

    Hi all...
    this is a SAP Problem. "Freezing popup after closing second popup".
    Please refer to OSS notes:
    1604022 and1604205 WD UR Mimes.
    I've search for month to get this problem fixed.
    BR,
    Ismail

  • How to prevent popup dialog from closing when commandbutton clicked

    Hi,
    I have a af:commandButton inside a popup dialog and the button action calls a method in backing bean. When this button is clicked I would like to run the method in backing bean and return control to the popup window. The method seem to run fine but the popup dialog closes automatically. Is there a way to prevent popup dialog from closing for this action?
    Thank you
    Kevin

    Hi Frank,
    Thanks for the link. I am not sure how to use this in my case. Following is part of what I am trying
    <af:popup ...>
    <af:dialog>
    <af:form usesUpload="true">
    <af:inputFile ..../>
    <af:commandButton text="upload" action="#{backingbean.uploadAction}"/>
    <af:outputText value="#{backingbean.filename} was successfully uploaded"/>
    </af:form>
    </af:dialog>
    </af:popup>
    When user clicks upload button I want to display a message that the file was successfully uploaded and keep the popup window open. But what happens now is once the file upload completes, the popup window closes automatically. This file upload part is not a must, user could skip doing the upload and instead input some text in a text area below (not shown in the code above). User could also just click cancel and exit the popup any time, so there is no mandatory field that I could check before closing the popup. Is there something I could do for this?
    thanks
    Edited by: user10720929 on Dec 23, 2008 10:36 PM

Maybe you are looking for

  • Just gotten my ipad mini.. updated to 6.1.2.. Could not connect to my home WiFi ( both 2.4ghz

    just gotten my ipad mini.. updated to 6.1.2.. Could not connect to my home WiFi ( both 2.4ghz & 5ghz ) Whenever i click on my network name in the ( Choose a network.. ) the grey circle icon just keep turning around for minutes and still can't connect

  • Robocopy Version XP010 - Excluding Multiple Directories using /XD

    I'm attempting to use Robocopy to routinely copy data between 2 servers.  In the file structure being copied there are several folders + their associated sub-folders e.g DfsrPrivate and Projects\Archived for this example I don't want to copy. I've at

  • HDMI ISSUE

    I have an M7-J010dx i7 HP laptop runing Win8.1 with all updates installed.  I do volunteer work that requires I give presentations.  I am experiencing compatibility issues with the HDMI port on my laptop and projectors made by Digital Galaxy.  Specif

  • Cannot find symbol even though it's there.

    I am having an issue compiling a java class in oracle. I have a java class that will run an executable. I want to call that java class from a difference class and when I try to compile that class, it fails with Cannot Find Symbol. This is what errors

  • Lotus Notes & LDAP with EP 7

    Hello All, We are planning to integrate Lotus Notes with EP 7.0 I would like to know if Lotus Notes is an LDAP or do we need a seperate LDAP Server. We are also planning to use Windows based authentication for the Portal, do we need to have an LDAP o