Show TOC

Implementing Data Loss ProtectionLocate this document in the navigation structure

Methods of the Container API that sets the "dirty" (unsaved) state of the page and triggers the data loss protection mechanism when needed. Set the dirty flag to true when there are unsaved changes in the application that can lead to potential data loss.

Syntax

setDirtyFlag(bIsDirty)

getDirtyFlag()

These methods are part of the SAPUI5 sap.ushell.services.container namespace. For more information, see SAPUI5 Demo Kit: Controls Start of the navigation path API REFERENCE Next navigation step sap.ushell Next navigation step services Next navigation step Container End of the navigation path.

Parameters

Parameter

Type

Description

bIsDirty

Boolean

Indicates whether the dirty flag should be true or false.

Example
Sample Code
<SCRIPT language ="JavaScript"> 
... 
var isDataChanged = sap.ushell.Container.getDirtyFlag()
... 
If(<change condition>) { 
sap.ushell.services.Container.setDirtyFlag(false);
} 
...
<SCRIPT>