Closing a Pop Up Window on click of a button

Hi Forum,
In the parent view there is a button, on click of this button a new pop up window is opened.
This pop up window also has a button (Submit). Onclick of the submit button in pop up window I need to performe some code execution and then close this pop up window.
I tried the steps given in the weblog
/people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications
But it does not seem to be working.
Any other way to achieve this or what might I be doing wrong here?
Thanks,
Anubhav.

Hi,
I missed a parameter in parent window while calling the pop up window
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component  TYPE REF TO if_wd_component.
DATA lo_window         TYPE REF TO if_wd_window.
lo_api_component  = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window         = lo_window_manager->create_window_for_cmp_usage(
                   interface_view_name    = 'WD_VALUE_HELP'
                   component_usage_name   = 'ZUSAGE_FORMNUM'
                   title                  = 'Additional Information For Item'
                  close_in_any_case      = abap_true <----Missed this earlier
                   message_display_mode   = if_wd_window=>co_msg_display_mode_selected
lo_window->open( ).
Now it is working fine.
Many thanks to all.

Similar Messages

  • Pop Up Window on click of save button

    Hi ,
    I am very new to WebDynpro Java.
    Can somebody plz help me??
    My Requirement-
    On Click of the Save Button ,a Pop Up window should get displayed with a message saying "SUCCESSFULLY SAVED".
    Plz reply soon
    Thanks In advance!!
    Regards
    Smita

    hi!
    1.create a action on the button click
    2.create a value node(popup)--> value attribute
    set the cardinallity as 1..1 and type as com.sap.tc.webdynpro.
    services.session.api.IWDWindow
    3.
    public void okPopup() {
    // @@begin okPopup()
    // get the repository content at runtime of the Web-Dynpro-
    IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI
    .getComponentInfo().findInWindows("okWindow");//give your window name
    // create the u201CokWindowu201D
    IWDWindow window = wdComponentAPI.getWindowManager()
    .createModalWindow(windowInfo);
    // set the WindowPosition on the screen
    window.setWindowPosition(300, 150);
    // and show the window
    window.show();
    // Save WindowInstance in Context
    wdContext.currentPopupElement().setWindowInstance(window);
    // @@end
    4.now you can take text views to show the required message in the popup window.for that you can take the message from message pool and also you can directly write the message in the text property of text view.
    please get back to me if any further clarification is required.
    thanks
    vishal

  • Complete a GP after closing a pop up window

    Hi all,
    I have written a wd4j application to be a callable object.  When a user clicks to approve the request, a pop-up window appears and ask if they are sure.  Upon clicking yes, the window should be closed and the GP should be completed.  I am having an issue with completing the GP, as it completes before the window is destroyed and thus throws a null pointer. 
    Does any one know where I should a)destroy the window and then b) complete the GP?
    I am closing the pop up window from my main window, via events raised by the component controller.  I have tried to move the gp.complete around, but I am not able to get it to work
    Thanks
    Ryan

    To finish the GP you should use
    executionContext.processingComplete();
    And to close the window popUp
    Try to use this confirmation window
    IWDConfirmationDialog dialog =
        wdComponentAPI.getWindowManager().createConfirmationWindow(....)....
    And in the actions that you decide
    you should destroy with this line, when dialog its the pop up.
    dialog.destroy();

  • Pop up window with yes & no push buttons

    hi
    i want to display a pop up window with yes & no push buttons
    can anyone help for this

    Hi,
    call function POPUP_TO_CONFIRM
    exporting
    TITLEBAR = pop_up' (for pop-up header)
    TEXT_QUESTION = 'do you want to save data'
    TEXT_BUTTON_1 = 'Yes'
    ICON_BUTTON_1 = ' '
    TEXT_BUTTON_2 = 'No'
    ICON_BUTTON_2 = ' '
    DEFAULT_BUTTON = '1'
    DISPLAY_CANCEL_BUTTON = ' '
    USERDEFINED_F1_HELP = ' '
    START_COLUMN = 25
    START_ROW = 6
    POPUP_TYPE = ' '
    IV_QUICKINFO_BUTTON_1 = ' '
    IV_QUICKINFO_BUTTON_2 = ' '
    importing
    ANSWER = ANS
    OR.
    Use POPUP_TO_DECIDE.
    call function 'POPUP_TO_DECIDE'
           exporting
                defaultoption  = '1'
                textline1      = text1
                textline2      = ' '
                textline3      = text-202
                text_option1   = 'YES'
                text_option2   = 'NO'
                titel          = text-114
                start_column   = 15
                start_row      = 6
                cancel_display = ' '
           importing
                answer         = zanswer.
    hope this helps.
    plz take a look on this function modules also:
    POPUP_TO_CONFIRM_LOSS_OF_DATA Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.
    POPUP_TO_CONFIRM_STEP Create a dialog box in which you make a question whether the user wishes to perform the step.
    POPUP_TO_CONFIRM_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point during an action.
    POPUP_TO_CONFIRM_WITH_VALUE Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
    POPUP_TO_DECIDE Provide user with several choices as radio buttons
    POPUP_TO_DECIDE_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
    POPUP_TO_DISPLAY_TEXT Create a dialog box in which you display a two line message
    thanx,
    dhanashri.
    Edited by: Dhanashri Pawar on Aug 19, 2008 2:20 PM
    Edited by: Dhanashri Pawar on Aug 19, 2008 2:25 PM
    Edited by: Dhanashri Pawar on Aug 19, 2008 2:26 PM

  • Destroy Portal Window on click on Logoff button

    Hi Experts,
    My requirement is a simple one. I simply need to destroy the portal window on click of logoff button. Initially i followed a few blogs and did the following.
    Created an HTML KM document and copied its link under the ume.logoff.redirect.url property. But this link is getting appended twice when i click the logoff button.
    Please let me know if there is some other way or if I need to make changes in the current approach. We access the portal within our own network i,e intranet.

    Hi Kaustubh,
    Below is the way we did -
    Create a logoff.html and place it inside km at any folder location. make sure everyuser group has full permission to this km folder. below is the code -
    use html head and start script language then -
    function closeWindow()
            window.opener = top;
            window.close();
    end script language
    call onload closewindow
    end body and end html.
    now, open visual admin and goto propery name - ume.logoff.redirect.url and write property value as -
    Property Value =
    http://<Server hostname:port>/irj/go/km/docs/.../.../logoff.html
    and restart the server.
    hope it helps.
    Regards,
    Sen

  • How to open a new pop-up window on click of a link using OAFunctions

    Hi ,
    I have a requirement to open a new pop-window on click of the responsibility name(functions available under responsibilities). The current URL /link is driven using OAFunctions.
    Any idea, how can i open a new window while still keeping the parent window as it is?
    Regards
    Puja

    This can be achieved, you need to first create the javascript function which will open the popup and add that to the HomePage through and then call that function during onLoad of the HomePage. Here is a code sample,
    1. Extend the page level controller and write a new controller
    2. Write the following code in processRequest before calling super.
    StringBuffer popupScript = new StringBuffer("function customPopUp() { ");
    popupScript.append("newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width=300,height=500);}");
    pageContext.putJavaScriptFunction("customPopUp", new String(popupScript));
    OABodyBean bodyBean = pageContext.getRootWebBean();
    bodyBean.setOnLoad("customPopUp");
    3. Use personalization to replace the existing controller with your extended controller and the popup should be launched whenever you enter the homepage.

  • Email Pop Up window on click of  tool area Link.

    hi
    i have three links say Link 1, Link 2, Link 3 in my tool are.My requirement is to have an email pop up opened with a defaulting email address in the "To" field to report an error or a query to the Link 3.
    Is it possible to implement this functionality in EP 6.0? if yes please tell how to proceed.
    thanx
    Disha.

    hi
    i dint get much from this link, could you tell me in different approach.
    i know how to give href to a link in the tool bar, but here i need the email pop up window with some default address.
    I follow the same, as given in the link, Have applied to code:
    < A href="mailto:[email protected]" target = "new".....</A>
    Anything else i need to add in the html code because this way it is not working.
    thanx
    Disha

  • How to close main window on click of a button on popup window

    Hi All,
    I have created a web page which on certain condition display a popup window to to provide information. Wht i want is that when i click on close button on my popup window, my main window should also close.
    Can anyone please help with this requierment!!!
    Regards,
    tushar

    Hi All,
    Could anyone of you please help me by answering the thread
    WDDOEXIT method not called when the application is closed from the portal
    Thanks,
    Subash M

  • Close window on click of a button

    Hi all,
    I am developing an application in which there are some checkboxes with a button on the window. When we choose these checkboxes (one or more) and click on the button it opens another window which has some textfields and one button. These textfields are for taking certain parameter to run a process which will be called when the button on second window is clicked.
    Now my problerm is that i want to make the second window closed on click of button on second window. But i m not getting the solution.
    This may be a stupid question but as I m new to this field I really need help.
    Thanks for any response.

    i want to make the second window closed on click of button on second window. But i m not getting the solution.Put following in the button action listener:
    secondWindow.dispose();
    //OR
    secondWindow.setVisible(false);Thanks!

  • How can we open a New Window on click of a button

    Dear All,
    Please can anyone guide me how to open a page in A new pop up window.
    Application Express 4.0.1.00.03
    Thanks & regards
    Arif Khadas

    Assalamwalkeum Tauceef,
    Thanks for your reply.
    For the second query where you want to refresh parent window and close the popup window,
    Create a html region and give a condition to this region that it should display on a particular request and pass that request on your button click and write this javascript code in your Region SourceAccordingly I created a Region on the Calling Page and have the condition Request = REFRESH.
    Now my problem is on the pop-up window how can I pass the Request as the action when button pressed is Submit and I am using an SQL Insert Action.
    For such an action for button click the Request field is hidden.
    Also please help me through this one for setting the Item values in the pop up window:
    I have the following in Execute When Page Loads
      var total = 0;
      var inv   = '';
      var selected_inv = '';
      total        = opener.document.getElementById('P24_PAY_AMOUNT');
      selected_inv = opener.document.getElementById('P24_PAY_INV');
      $s('P23_RCP_AMOUNT_PAID', total);
      //setSessionValue ('P23_RCP_AMOUNT_PAID', total);
      $s('P23_INVOICES', selected_inv);
      //setSessionValue ('P23_INVOICES', selected_inv);The value that I am getting for the above Items is "     [object HTMLInputElement]" in Mozilla Firefox and "[object]" in Internet explorer, not sure why?
    Please guide.
    Thanks & Regards
    Arif Khadas
    Edited by: Arif Khadas on Apr 27, 2011 9:51 AM

  • Bookmark pop up window incomplete-missing right side buttons

    When I use the Bookmark Button and select "Bookmark This Page" the pop up window to place the bookmark is incomplete. The right side is cut off and the buttons to select or add folders is not shown.

    You can try to disable hardware acceleration in Firefox (you need to close and restart Firefox).
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to open a window on click of a button?

    Hi,
    I want to open a window(a new browser page) on the click of a button.Can anyone please tell me what i should write in the onAction of the button?
    Regards,
    Padmalatha.K

    hi,
    1.Declare the following in the implementaion of the component controller
    //@@begin others
      IWDWindow modalWindow;
      //@@end
    2.First create a method in the component controller :
    public void createExternalWindow( )
        //@@begin createExternalWindow()
        // create external window
        IWDWindow externalWin = wdComponentAPI.getWindowManager().createNonModalExternalWindow
                                                            ("http://www.google.co.in/", "External");
        //Define window position and dimensions according to acreen parameters
        externalWin.setTitle("Google");
        externalWin.setWindowPosition(WDWindowPos.CENTER);
        externalWin.setWindowSize(1280,850);
        externalWin.show();
        //@@end
    3.Create a button in the view, create an action. assign this action to the button . Now call the method in the view controller.
    public void onActionexternal(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionexternal(ServerEvent)
        wdThis.wdGetPopUpCompController().createExternalWindow();
        //@@end
    Now to create a modal window
    1.Declare the following in the implementaion of the component controller
    //@@begin others
      IWDWindow modalWindow;
      //@@end
    2.Create a new window "NewPopWindow".Declare the following in the implementaion of the component controller.
    public void createModalWindow( )
        //@@begin createModalWindow()
        //creating the window
        IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("NewPopWindow");
           modalWindow = wdComponentAPI.getWindowManager().createModalWindow(winInfo);
        //display window in centre
        modalWindow.setWindowPosition(WDWindowPos.CENTER);
        modalWindow.setTitle("Modal Window");
        modalWindow.setWindowSize(400,100);
        //opening the window
        modalWindow.show();
        //@@end
    3. destroy the window
    public void destroyModalWindow( )
        //@@begin destroyModalWindow()
        modalWindow.destroyInstance();
        //@@end
    4.Create a button in the view, create an action. assign this action to the button . Now call the method in the view controller.
    public void onActionmodal(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionmodal(ServerEvent)
       wdThis.wdGetPopUpCompController().createModalWindow();
        //@@end
    regards,
    pinki
    Edited by: pinki goswami on Apr 17, 2008 11:42 AM

  • Open new window on click of a button

    Dear All,
    We are using VC for development of Dashboards.
    I have created the related i views.
    First page of dashboard shows all the high level graphs.
    I intoduced a button on the chart to go into details (another Iview)
    I was able to navigate to the next layer on click of button in tool bar and comeback to the first layer again.
    I want to open a new window when I click on the button on the tool bar of chart..
    Is it Possible in VC? Please help us in this regard.
    Points assured in full.
    I have already posted this issue in the forum VC 7.1. But I couldn't get the answer.
    Please Help us.
    Thank You All and Regards
    Joga Srinivasa

    Dear All,
    Sorry for getting back late.
    Thanks for your inputs. Problem is solved using pushbutton. I gave the URL of the second Iview in the hyperlink of the pushbutton system action.
    The problem with the Popup window is that it wont allow you to to go back and choose or analyze other parts of dashboard. so we adopted the pushbutton approach which takes you to another window allowing full access to the main window.
    Once again, Thank you all.
    Points assigned as promised.
    Regards
    Joga

  • How do I print off of a pop-up window? There are no buttons that I can find!

    The website I use to get my paperwork for my job creates a pop-up window that has my work order in it. I used to use firefox to do this because I was able to scale it down in print preview and reduce the amount of paper I use, but now I can't even print at all! Is there something I'm missing or is it just gone?

    cor-el: WOW can't believe I forgot basic Windows shortcuts. That works the only problem is there isn't a print preview to check things out. Thanks!
    edmeister: I found that Print button a while ago but it will only print the main window as far as I can tell. The window I need is a pop-up that doesn't have any menu buttons. Ctrl+P works though!

  • How do I get pop-up windows to show the navigation buttons (not just the address box)?

    When I click on a link that opens a new firefox window, the new window shows a navigation toolbar that does not include the back, forward, stop, and home buttons (it only shows the internet address box). However, the original firefox window that I navigated away from shows all of the navigation buttons AND the address bar. How do I get these new firefox windows to show the navigation buttons in addition to the address box that automatically appears?

    See:
    http://kb.mozillazine.org/Prevent_websites_from_disabling_new_window_features
    http://kb.mozillazine.org/JavaScript#Advanced_JavaScript_settings

Maybe you are looking for

  • Photoshop painting black when I'm not using black?

    Okay so this just started yesterday. I was painting in photoshop and starting to color what I had drawn but for some reason it starts painting some black into the color I'm using. I have no idea why it's doing that. I do everything in separate layers

  • I have erased my hard drive, and now i cant find it on DU

    I have erased my hard drive, now when i'm trying to re-install mountain lion i can't see the hard drive in DU. Any ideas on how to restore this?

  • Firefox says there was an error and it has to close

    My computer worked fine yesterday, this morning I kept getting a pop up box that said error Firefox needs to shut down, and on the left hand side of the box is a debug button. I tried pressing that once, but nothing seemed to happen. This has been ha

  • PSE 8.0 is very slow with tags

    I used to work with V5.0 and was very happy with that. Then I saw the feature of 8.0 an upgraded to it. After I had converted my database, the program was so slow. Adding a new tag took about one minute. Adding this tag to a picture took another minu

  • Struts2 - Escape form values while submitting

    Hi, I am using struts2 and annotations for validations. In my form, when i put following text in any textbox and say validation gets failed then same form display again but the textbox (Where I entered following text) shows wrongly, i mean text box s