cancel
Showing results for 
Search instead for 
Did you mean: 

wdDoExit of View

Former Member
0 Kudos

Hi.

I'm having trouble understanding when wdDoExit will be called on a View. wdDoInit is called whenever the view is entered but wdDoExit is not called when leaving the view. In fact wdDoExit of the component controller is also not called.

Is there a setting I am missing? I have experimented with the view lifespan property using "when_visible" and "framework_controlled" with no luck.

I am on Netweaver 2.0.6.

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mark,

assume, that you have two views:

1. View A, having outbound plug toB and inbound plug fromB

2. View B, having outbound plug toA and inbound plug fromA

3. Links between toB->fromA and toA->fromB

View A has framework_controlled lifecycle, view B when_visible, then:

If you fire the plug toB, view B is created, view A <b>is not</b> destroyed (no wdDoExit() call).

If you fire the plug toA, view B <b>is</b> destroyed (wdDoExit is called) and view A is displayed again (no creation).

This repeats every time you navigate forward and backwards. The important thing is, that view B is removed from the current view assembly (e.g. becomes invisible) by the navigation to view A. Otherwise it will not be destroyed.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan

How is it with custom controllers? Is it framework controlled by default because I dont see a setting by which I can define it to be famework controlled or otherwise.

Regards

Pran

Former Member
0 Kudos

Hi Pran,

yes, they are created on demand (first access of context for example) and will be exited, when the component controller exits.

Regards

Stefan

Former Member
0 Kudos

Hi, can wdDoExit be called on cs and is it called when i close a Business One form?

Tank You

Former Member
0 Kudos

Hi Mark

To understand the behaviour of the wdDoInit and wdDoExit I put in log messages and I found that Init method is called when the component is loaded and happens only once.

The exit method is called when the component is unloaded or specifically when the browser is closed . I am not sure if the exit method is called in other scenarios like a session timeout etc. The exit method is a hook method where you can plug in code like connection close or release objects to pool etc

Regards

Pran

Former Member
0 Kudos

Pran,

Yes, wdDoExit is called on all controllers on session timeout -- in fact, the whole component is destroyed.

Btw, when you are closing web browser, page sent request to close session.

Except of closing browser window, you can leave your application via navigating to different arbitary url / other WD application. Before such navigation component will be destroyed.

Also you can include your component in other component via Component Usage. If you manually call deleteComponent on corresponding component usage, your embedded component will be destroyed, and, therefore, wdDoExit will be called on all of its controllers.

Regards,

VS