on 09-01-2004 8:57 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.