cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

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

*

Answers (4)

Answers (4)

0 Kudos

In CompA I created an empty modal window. And from there navigated via plug to CompB.

It's working so.

Former Member
0 Kudos

Hi Marie,

I am faced with the same issue. Could you help ou it some detail ?

In Comp A you created empty modal window. Is this a window without a view in it ?

And then how you navigate to CompB via plug exactly ? Is it just an outbound plug

And navigated t a window in Comp B ?

Prem

0 Kudos

Thanks for your answers .

Issue is that even if I create the embedded component via CompB.createComponent();

the windowInfo is null (not yet initialized).

Any idea how to have it initialized ?

Former Member
0 Kudos

Hi,

Create a window as part of Comp A Embed the exposed view controller to this window and popup this window.

Regards

Ayyapparaj

Former Member
0 Kudos

hi,

In comp A, create one new Window, and open, select create view, then embed an existing view that you want.

Again from Comp A, use the following code


windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PreviewWindow");
window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
window.open();