Skip to Content
avatar image
Former Member

External PopupWindow

Hai friends,

I want to create an external popup window with a view in another window.How can i do this

Please help me on this issue.

Regards,

krish.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jul 07, 2009 at 02:43 PM

    Hi Krish

    try this

    IWDWindowInfo wInfo =wdComponentAPI.getComponentInfo().findInWindows("<YOUR WINDOW NAME>");
    IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(wInfo);
    window.show();

    Regards

    Marcos

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 08, 2009 at 03:27 AM

    Hi Krish,

    You need to create another window with the view embed in it and then use the code given above in the main window in the method where you want to call that popup.

    Take care of the window name that you will specify in the double quotes as it is case sensitive.

    Also you can go through this pdf to learn how to work with popup:

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/dialog%20boxes%20in%20web%20dynpro%20applications.pdf

    Regards.

    Rajat

    Add comment
    10|10000 characters needed characters exceeded

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

    Hi,

    Refer this code,

    IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(

    "http://www.google.de",

    "Google - Search for an email address",

    false);

    window.open();

    Regards,

    Sunaina Reddy T

    Add comment
    10|10000 characters needed characters exceeded

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

    Hi,

    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 App1 (Created for Window1InterfaceView) and App2 (Created for Window2InterfaceView).

    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 =

    wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();

    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(

    deployableObjectName,"App2",WDDeployableObjectPartType.APPLICATION);

    // 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");

    window.show();

    } catch (WDURLException e) {

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

    } catch (WDDeploymentException ex) {

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

    }

    Note:/Warning: 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 below thread:

    open-view-or-window-in-a-external-window-popup

    Regards,

    Charan

    Add comment
    10|10000 characters needed characters exceeded