cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

When onExit() will be executed?

Former Member
0 Likes
10,812

Hi,

Documentation tells that onExit() calls by framework when view is destroyed.

Does any one know whether Controller's onExit() will be called either on page "refresh" OR closing browser tab.?

Thanks,

Srinath

View Entire Topic
Former Member
0 Likes

Hi Ulrich,

Thank you for response.

In our app we are not using Routing and it is a Customized UI5 app.

Challenge here is, in our app we are calling 'DestroySession' OData call to kill user session inside "beforeunload" method. 'DestroySession' should execute only Closing of the browser, not on Browser refresh. Unfortunately, "beforeunload" is being called on browser "refresh" also.

I tried to distinguish between "refresh" and "tab close", but no luck.

I tried modifying 'beforeunload' so as to prompt user with options "Leave/Stay", but am unable to get the event on which button user has clicked (Leave/Stay).

So, thought of shifting 'Destroying Session' OData call to onExit(). Trying to see when onExit() will be executed, either on 'refresh of the page' OR 'tab close'.

Thanks,

Srinath

0 Likes

Unfortunately this cannot be achieved with onExit. It is only be used in the use cases described above.