Show TOC Start of Content Area

Component documentation Using WorkProtect Mode  Locate the document in its SAP Library structure

To avoid losing unsaved data when navigating to another iView, the portal provides a WorkProtect mode that, when activated, provides the user an opportunity to save any changes before navigating.

Setting WorkProtect Mode

You can turn WorkProtect mode on and off for your application, and also set the type of WorkProtect mode, by calling the WDPortalWorkProtectMode.setApplicationDirtyControl() method.

There are three settings for WorkProtect mode:

      None: WorkProtect mode is off.

      Application Only (default): Only the application determines the dirty state, that is, whether there is unsaved data. With this setting, the dirty state is only defined on the server side, so data that is not transported to the server may still be lost.

      Standard: The application and the Web Dynpro browser client both check the application state. The Web Dynpro browser client makes sure that no user input data that is typed into the user interface is lost, by setting the dirty state as soon as the user makes an input.

The following is an example of setting the mode to standard:

WDPortalWorkProtectMode.setApplicationDirtyControl( 
    WDApplicationIsDirtyMode.STANDARD); 

Indicating that Data Has Changed (Dirty State)

The application can indicate that there is unsaved data by calling WDPortalWorkProtectMode.setApplicationDirty() method, as shown in the following example:

WDPortalWorkProtectMode.setApplicationDirty(true); 

Note

WorkProtect mode is only available for applications that run in the Web Dynpro browser client.

Changing the Layout of the WorkProtect Dialog Box

You can change the appearance of the dialog box used to notify the portal user about unsaved data. Two layouts are provided:

      default: The user chooses a radio button option

      buttons: The relevant options are displayed as buttons

Note

The buttons layout is only relevant for SAP NetWeaver Portal navigation within Microsoft Internet Explorer. When closing the browser window, or when using Mozilla Firefox, the default layout is used.

...

       1.      Make sure that you are assigned to the system administration role.

       2.      In the portal, go to System Administration System Configuration Service Configuration.

       3.      In the portal catalog, expand Applications  com.sap.portal.epcf.loader Services.

       4.      From the context menu, choose Configure.

       5.      In the workprotect.popup.layout property, enter either default or buttons.

       6.      Save and restart the service.

Note

See SAP note 734861 for more details.

End of Content Area