Skip to Content
avatar image
Former Member

pop up window

Hi,

Can any body tell me how to create a simple application which shows pop up window.for example my requirements,

1) I need to design a form where user name and password input fields are there including one button submit.

2) once we click on submit button it should open a pop up window.which should have ok and close button.

Regards

Imran

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    May 25, 2010 at 10:38 AM

    Imran,

    Steps to be folllowed for creating popup:

    a) Create a new view having ok and close buttons

    b) Create a new window and embed the new view created in this window

    c) Using IModalWindow API(http://help.sap.com/javadocs/NW04/current/wd/com/sap/tc/webdynpro/services/session/api/IWDWindowManager.html); create an object of newly created window

    d) open the window as popup in parent view

    Regards,

    Gangadhar

    Add comment
    10|10000 characters needed characters exceeded

  • May 25, 2010 at 10:39 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 31, 2010 at 05:51 AM

    Hi Imran,

    Create View 1 with username, password fields and submit button assign it to Window1 (default window)

    Create view 2 with ok and close button and assign it to a new window, Window 2(you will have to explicity create a new window)

    Create a context attribute PopUpElement of type IWDWindow in view 1 ( This is for opening and closing of the popup window)

    On click of the submit button in view 1. Insert the following.

    IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI

    .getComponentInfo()

    .findInWindows("Name of Window2");

    IWDWindow window = wdComponentAPI.getWindowManager()

    .createWindow( windowInfo, true);

    window.setWindowPosition(300, 150);

    window.open();

    wdContext.currentPopUpElement().setWindowInstance(window);

    This should help you.

    Regards

    Christina Rodrigues

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 31, 2010 at 06:25 AM

    Hi Imran,

    By using this code you have to Open Popup Window

    public void popup( )

    {

    //@@begin popup()

    poplink=wdComponentAPI.getWindowManager().createModalWindow(wdComponentAPI.getComponentInfo().findInWindows("Wd_POPupwindow"));

    poplink.setWindowPosition(500,30);

    poplink.open();

    //@@end

    }

    Wd_POPupwindow-- This is Window Name Under this window you can create in View that view having OK and Close Buttion.

    *When click on Submit button that time you call the popup method. that time you will get popup window*

    Regards

    Vijay Kalluri

    Edited by: KalluriVijay on May 31, 2010 8:26 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 31, 2010 at 07:24 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 31, 2010 at 10:03 AM

    Hi imran,

    follow this code for popup window:

    for open popup window:

    IWDWindowInfo windowInfo=(IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("popupwindowname");

    IWDWindow window=wdComponentAPI.getWindowManager().createWindow(windowInfo,true);

    window.show();

    to close pop up window:

    window.hide();

    Add comment
    10|10000 characters needed characters exceeded