Skip to Content
avatar image
Former Member

Views on new Window

Hi,

I need to open multiple various views on new window. I have a window named "PopupWindow" to which i have embedded multiple views. How will i show different views based on the user actions. My code goes like this

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

IWDWindow window = wdThis.wdGetAPI().getComponent().getWindowManager().createWindow(windowInfo, true);

wdContext.currentContextElement().setWindowInstance(window);

window.setWindowPosition(WDWindowPos.CENTER);

window.open();

-


rt now it opens one view which i had embedded. How will i call different views. Wht code need to be written to show a particular view? Pls help

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 30, 2005 at 05:22 AM

    Hi Sujesh,

    In case you don't want to use the event, the simple way is:

    1)Create an attribute in your controller which will hold some value o which the flow is decided.

    2) Map the attribute to your parent view and your default view in your popup window.

    3) Update the attribute from your parent view.

    4) Open the window through your code

    5) In the doInit() method of your default view, read the value of the mapped attribute and fire the plugs accordingly. (Ofcourse you should have created plugs to the rest of the views).

    Hope this helps,

    Best Regards,

    Nibu.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 30, 2005 at 05:15 AM

    Hi Sujesh,

    1)Embedd all the views that you want into the popup window.

    2) Create outbound plugs from the default view of the popupwindow to the rest of the views.

    3)Create an event in your controller.

    4)Create a method in your controller that will trigger this event.

    5) Write an eventhandler for this event in the default view of the popup window. In the eventhandler, write your logic to fire the different plugs.

    6) After you open your window through your code, call the controller method that will trigger the event. (You can pass parameters through this method, so that they can be used in your logic for the flow of control).

    Hope this helps,

    Best Regards,

    Nibu.

    Message was edited by: Nibu Wilson

    Add comment
    10|10000 characters needed characters exceeded