peChangedViewExitAction - cWebView

Determines how a view should handle unsaved changes when closing a view during during back navigation

Type: Property

Access: Read/Write

Data Type: Integer

Parameters: None

Syntax
 Property Integer peChangedViewExitAction

Read Access: Get peChangedViewExitAction to IntegerVariable
Write Access: Set peChangedViewExitAction to IntegerVariable/Value


Description

Determines how a view should handle unsaved changes when closing a view during during back navigation (NavigateClose, NavigateCancel).

Valid values are:

ConstantMeaning
cveConfirmSaveClearCancelConfirm close with a Save, Clear Cancel dialog
cveConfirmAbandonChangesConfirm close with an abandon changes dialog
cveSaveAttempt to save the view before closing
cveAbandonChangesIgnore the changes and close the view


When navigating back, the framework checks to see if the view to be closed has changes. If so, the developer is given a choice of how to handle this. You can choose to:
1. Present a "Changes Exist, save changes?" dialog that allows you to select yes, no or cancel (cveConfirmSaveClearCancel)
2. Present a "Data Loss, abandon changes?" dialog that allows you to select yes or no (cveConfirmAbandonChanges)
3. Save the data without any confirmation (cveSave)
4. Close the view and lose the changes without any confirmation (cveAbandonChanges)

If you do choose to save the changes and those changes fail, the view will not be closed.

The default behavior is to present the "Changes exist, save changes" yes/no/cancel dialog. This can be configured on a view by view basis using the peChangedViewExitAction property.

The default for peChangedViewExitAction is cveConfirmSaveClearCancel.

When navigating back through multiple views, the changed view logic gets more complicated. The changed view may be in the middle of the view stack being closed or there may be multiple changed views in the view stack that need to be closed. The framework is smart enough to handle all of these situations allowing the user to close as many views as possible without losing any data.