cancel
Showing results for 
Search instead for 
Did you mean: 

Closing a popup from another component?

Former Member
0 Kudos

Hi All,

I've created a popup window with a view from another component.

Component A has a view A and with a button it opens a popup with a view B from Component B.

So far so good.

Now I want to close this popup with a button in view B.

Normally you close a popup by calling the appropiate method from the component controller:

wdThis.wdGetAComponentController().fireClosePopupEvent();

But this is not possible because the view B from component B can not access the component A controller.

Is there anyway how I can do this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

B.,

Create event Close in component B interface controller, fire this event on button click. In component A subscribe to this event and close window.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Thanks Valery,

This solved my problem.

Is it also possible to handle context data between the components like this?

(like the email-popup tutorial, only now cross component)

Former Member
0 Kudos

B.,

What do you mean with "like this"?

It is always possible to map context data between outer component and component usage of inner one.

Also it possible to send "small" data with event parameters from inner component.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Prooijen,

Create a new action event in Component B, subscribe to this event from Component A by creating a new event handler method and fire this event in component B (View B's Close button).

In Component A, since u alreay have popup window Id, can simply close it. This should be done in the action handler method which is subscribed to the event of Component B.