cancel
Showing results for 
Search instead for 
Did you mean: 

how to continue runnig code in a view after closing a popup?

0 Kudos

Hello,

I'm using NW2004s SP9. I have a view which opens a modal window through a custom controller. The implementation of the popup is ok, I have two buttons and I can close the window.

My problem is: I'm calling the opening code from a view and the code in my view should wait until the window is closed and then continue like this:

1. main view: button in view is pressed

2. main view: open modal window and wait

3. modal window: wait for button click

4. modal window: close modal window

5. main view: continue in my method

It is possilbe to split my method in two parts, but I'm looking for a nice way to call this second method. The wdDoModifyView method is not possible because it is static. Calling an event is also not possible because the view has no event controller.

What is the best way to coninue?

Regards, Nils.

Accepted Solutions (1)

Accepted Solutions (1)

monalisa_biswal
Contributor
0 Kudos

Create an event on a controller(Componet or Custom) and method to fire that event.

Call that method from the popup view on click of button to fire that event.

Create a event handler method in parent view to handle that event and call the second method inside the event handler mathod.

Hope it helps!

0 Kudos

Hi Monalisa,

I can't create an event handler in a view. I can only create methods and actions. But I neither can call a method or an action from my popup view nor from my custom controller.

So it looks like I have to change the whole coding and put it into my cc.

Regards, Nils.

siarhei_pisarenka3
Active Contributor
0 Kudos

> I can't create an event handler in a view. I can only create methods and actions.

Hi Nils

You CAN create event handler in a view controller. When you click Create Method studio will ask you what you want to create, method or event handler.

BR

Sergei

0 Kudos

Hi,

like we say in germany: "One does not see the forest before trees." => I still have a few event handlers in the view...

Thans a lot and best regards, Nils.

Answers (0)