Skip to Content
avatar image
Former Member

Work protect Feature?

hi,

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

Regards,

Bob

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 26, 2006 at 06:33 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 26, 2006 at 06:42 AM

    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

    Add comment
    10|10000 characters needed characters exceeded