cancel
Showing results for 
Search instead for 
Did you mean: 

Work protect Feature?

Former Member
0 Kudos

hi,

Please explain work protect feature in Portal. I am new to portal. please explain in detail

Regards,

Bob

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

Work protect feature provides the infrastructure for handling unsaved

data in stateful applications. It prevents server sessions from being

closed if a user entered data into an sap transaction and navigate to

another portal appn without saving data.

Go to personalize link - > work protect mode.

1. protect unsaved data

2.choose action in popup on unsaved data

3. discard unsaved data.

select any and restart the browser.

There is also workprotect apis

Regards,

Ganesh N

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bob,

To avoid losing unsaved data when navigating from one iView to another, the SAP Enterprise Portal provides the work-protect mode. Having unsaved data in an application is also called “dirty state”. In this feature you can protect unsaved data by setting a page flag that causes new objects to open in new windows during navigation.

Some more info...

Workprotect mode is a feature of the portal framework which can be used via javascript API by the applications which are running in the portal. This javascript API is the EPCM file.

If you want to use the workprotect mode of the portal you have to define a variable in your javascript which will hold the status of the dirtyFlag.

var dirtyFlag = false;

Now u can tell the portal that you will take part of the workprotect mode by subscribing to a special event of the portal.

epcm.subscribeEventReliable("urn:com.sapportals.portal:workprotect","inquiryProtection",window,"my_protectionHandler");

Now define a javascript function:

function my_protectionHandler( event ){

return dirtyFlag;

}

What will happen:

You have subscribed to an portal event which will be thrown when the user will navigate. In order that the portal knows which javascript function it must call to the your dirtyFlag you tell him the name of your function, ie. my_protectionHandler.

The only thing is now that you have to set the dirtyFlag depending on your business.

This is the workprotect function for portals.

Regards,

Pooja.

Message was edited by: Pooja S