Skip to Content
avatar image
Former Member

PopUP window


I wanna to create a web dynpro application which have a button. When a click a button an application open a popup window of an another view(with the frame) as such as the popup window in portals.

how can i do this..Please help on this issue.

thank in advance


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 07, 2009 at 12:46 PM


    Create two Views and two Windows and one Application.

    View1 >Window1 >App1


    Now when user clicks on "OpenWindow2Popup" button in View1 in Window1 open the Window 2 as popup Window:

    IWDWindowInfo winInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("Window2");
    IWDWindow popup= (IWDWindow)wdComponentAPI.getWindowManager().createModalWindow(winInfo);

    Note: Create one context attribute Window2Inst of type IWDWindow and map this attrinbute to both the View1 & View2 throgh the component controller. In View2 when user clicks on Close button execute the below line of code to close the popup.




    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 12:50 PM

    Hi Krish,

    Create one window named popupwindow. And embed the view which you want to open it as a popup.

    Make the default value property of that view as true.

    Now write the following code.

    IWDWindowInfo winInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("popupwindow");
    IWDWindow popup= (IWDWindow)wdComponentAPI.getWindowManager().createModalWindow(winInfo);
    popup.setWindowSize(220,150); // change the size to fit your view
    popup.setWindowPosition(100,100); // change the position to make it center or to fit your requirement.;



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 12:53 PM
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      If you want the url of the another window in your WD Component. As per my knowledge you need to have a seperate application to be created for this window also.

      For Example you have Window1 (View1 is embeded in this window) and Window2(View2 is embeded in this window). Now you need the url of the Window2.

      So for this purpose you need to create two applications for this WD Component.

      For example as below:

      App1 - Created for Window1InterfaceView - Window1 - View1

      App2 - Created for Window2InterfaceView - Window2 - View2

      Now use this below code to open the Window2 URL in a sepearate window.

      // Get name of deployable object this component belongs to

      String deployableObjectName =


      Map urlParameters = new HashMap();

      // If there are any application parameters you need to pass to App2 you can set those in urlParameters

      // as urlParameters.put("key","value");

      try {

      // Get deployable object part of target application.

      // Precondition: assume, that other application belongs to the same

      // Web Dynpro Project (Deployable Object)

      WDDeployableObjectPart deployableObjectPart =WDDeployableObject.getDeployableObjectPart(


      // Get target URL based on deployable object part and URL parameters

      String urlToTargetApp =WDURLGenerator.getApplicationURL(deployableObjectPart, urlParameters);

      //Open this urlToTargetApp in external window.

      IWDWindow window = wdComponentAPI.getWindowManager(.createNonModalExternalWindow(urlToTargetApp,"Window2");;

      } catch (WDURLException e) {

      messageMgr.reportException(e.getLocalizedMessage(), false);

      } catch (WDDeploymentException ex) {

      messageMgr.reportException(ex.getLocalizedMessage(), false);


      Note: We are opening another window using another WebDynpro application.

      Here it creates a seperate WDComponent instacne. You can't access Window1(View1)'s existing context data in Window2(View2). The only way is you can pass some data using app/url parameters.

      Apart from this as per my knowledge there is no other way to get the url for a Window.

      Check this thread:




  • avatar image
    Former Member
    Jul 08, 2009 at 06:31 AM


    Refer this code,

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

    IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

    window.setWindowPosition (300, 150);;



    Sunaina Reddy T

    Add comment
    10|10000 characters needed characters exceeded