on 10-10-2011 2:52 PM
I need to detect when a user navigates away to stop a timer set for the purpose of logging out a user after a certain amount of time. If they click exit I can capture the event but if they click another tab then I cannot. I know when in edit mode the SAP code for work protect will catch that and ask if you would like to save, but I don't think I have any access to that code. Does anyone know how they accomplish this and can it be done if the user is just looking at data also?
Yes, you can do that using Exit Hook method wdDoExit
We have used following hook to unlock the locked record of database table, which was open in edit mode.
//@@begin javadoc:wdDoExit()
/** Hook method called to clean up controller. */
//@@end
public void wdDoExit()
{
//@@begin wdDoExit()
wdComponentAPI.getMessageManager().reportSuccess("exit called");
//@@end
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
see if we can use the exit plug
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
It is certainly possible to use the work protect mode in custom Web Dynpro Java applications.
Have a look at http://help.sap.com/saphelp_nw72/helpdata/en/4a/3c4a0b0f841cbbe10000000a42189c/frameset.htm
Also, the workprotect level can be switched during runtime, which might come in handy when handling different views in your application
Hope this helps!
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
Have a look at this EPCM WorkProtect document http://help.sap.com/saphelp_nw73/helpdata/en/4a/2918293e7b044ee10000000a421937/content.htm it might be of help
You may catch the EPCM.getDirty() state and upon true, do your magic
Cheers,
Robin
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.