cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to open a modal Window and display another component's view in it?

marie-pierre_mela
Product and Topic Expert
Product and Topic Expert
0 Kudos
188

Hi,

I have 2 separated components in 2 projects. Comp A is using Comp B. And Comp B has an interface view through which data can be passed.

In comp A, somewhere I would like to open a new modal window containing view of comp B. For such I'm using the method createModalWindow (or is there another way ?) But createModalWindow needs IWDWindowInfo windowInfo as parameter and windowInfo can only be gotten from view on same component. I tryed to cheat this by sending windowInfo via interface, but no way.

Any other idea ?

Thanks and regards

View Entire Topic
Former Member
0 Kudos

Hi Marie,

I think we can do this; Create a context node of type IWDWindowInfo in Component B view and map that with the interface Controller element of same type. Create a context element of same type in Component A and Map the three elements and hence you can access the reference of IWDWindowInfo in Component A. Rest of the things you know how to use them.

In component A (view)


IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows( "PopupWindow");
wdContext.currentContextElement().setWindowInf( windowInfo);

In Comonent B (View)


IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow( (IWDWindowInfo) wdContext.currentContextElement().getWindowInf());
window.show();

Don't forget to map the interface context element with the component context elements and the type must be of IWDWindowInfo ( Java native Method)

Regards

- Vinod

*