Skip to Content

[Portal] Clean-up when navigating away

Hi,

I know Work protect mode can be used to ask users whether they want to leave the current page or not.

Nevertheless, assuming that they choose 'Yes', is there a way to catch this and do some clean-ups on the server-side?


I doubt there is some 'onUnload' function somewhere but by registering some Portal events, would I be able to catch the user closing the web browser or navigating away from my Web Dynpro app?

Is there a 'hook' I can leverage in the Distributed Session Termination mechanism...?

Thanks in advance for your help.

Best regards,

Guillaume

Message was edited by: Guillaume Garcia

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Jun 20, 2012 at 05:16 AM

    Hi Guillaume,

    The WDDOEXIT method of component controller, view and window can be utilised for clean up. Additionally, the WDDOONCLOSE method of window can be used. However, bear the following in mind:

    • These methods are WD life cycle methods. This means, that they will be called by WD framework as it finds suitable, including session expiry.
    • The browser close might fire the method, though I am not sure, but most certainly won't let you prevent closing the window, if that's your objective. You may gamble with some bit of JavaScript, if your organisation policies allow them to be written, to abort closure.
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 20, 2012 at 01:04 PM

    Hi,

    After some thourough investigations, the Portal DSM is sending the sap-sessionCmd = USR_ABORT and the ABAP backend replies with a sap-session = RELEASED and the message 'Application terminated...' but the session exists (SM04) and the locks are not released (SM12).

    Best regards,

    Guillaume

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 07, 2012 at 04:44 PM

    Hi Guillaume,

    We had the same problem and SAP replied that we had to clean iview parameters in order that SAP Netweaver Portal could work properly.

    Indeed, in the application name, we added a parameter "&sap-language=EN" after the name of our application to force the iview in English language. (When we put English in the logon language it did not work).

    So now it works, and a trick to oblige the portal to open in the English language, is to put a language that is not customized in the portal like Danish for us.

    example:

    Application name = xxx_td_upload (suppression of &sap-language=EN)

    Logon language = Danish

    ;-)

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.