cancel
Showing results for 
Search instead for 
Did you mean: 

do something whenever a view is left

daniel_humberg
Contributor
0 Kudos

I have some coding that needs to be executed whenever the user leaves a certain view and goes to another view.

When the user navigates to another view, either one of the outbound plugs are fired or a different tabstrip is selected.

The lifetime of my view is "framework controlled", not "when visible".

What can I do?

Accepted Solutions (1)

Accepted Solutions (1)

Yashpal
Active Contributor
0 Kudos

Hi,

u can write the code in WDDOBEFORENAVIGATION( ) method of comp controller...it is executed everytime when some action is performed in view...

Regards

Yash

daniel_humberg
Contributor
0 Kudos

Hi Yash,

WDDOBEFORENAVIGATION seems to be called too often.

Is there a change to check inside the method, from with view to which other view the user has navigated?

Regards, Daniel

Answers (2)

Answers (2)

0 Kudos

Hi Daniel,

The code you should put it in the WDDOEXIT. This will works fine with your settings (framework controlled) .

Only one thing: For example if you have tabstrips when you change the view by clicking on a tabstrip, the action SELECT_TABSTRIP will be triggered before your WDDOEXIT method.

I hope this will help you.

Regards,

Constantin

daniel_humberg
Contributor
0 Kudos

Hi Constantin,

in my case, WDDOEXIT is almost never called, only when I close the entire application.

Regards, Daniel

Former Member
0 Kudos

Hi,

that is why you whould try to change the lifetime 'when visible',

so it is called when you leave the view, framework makes you wait till the application is closed

grtz,

Koen

Former Member
0 Kudos

hi daniel.........

if some code must take place.......

then before the plug is called just write the codings, inside the same event.

---regards,

alex b justin

Former Member
0 Kudos

Hi,

if your lifetime is 'when visible' then the wddoexit will be called when you leave it,

maybe something to consider?

grtz,

Koen