cancel
Showing results for 
Search instead for 
Did you mean: 

Views on new Window

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Ok..Let me try and get back to you...thanx..Will reward after I test the same....Cheers!

Answers (1)

Answers (1)

Former Member
0 Kudos

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