Class: ExitSafeguard

ExitSafeguard

The Exit Safeguard control is used as a confirmation message that is activated when the user closes a browser window or tab. This control can be used to prompt the user that they are about the close a window or tab.  Note: To combat unwanted pop-ups, some browsers may not display prompts created in beforeunload event handlers unless the page has been interacted with; this is currently true for FireFox.  If a user never interacts with a page, the browser does not display the confirmation message. An ExitSafeguard control provides the following configuration properties in Process Designer:

Challenge On Exit By Default: When true a challenge is presented to the user if they attempt to close the browser window boolean
Exit Challenge Message: Additional message to display when challenging exit. All browsers will display a challange, but not all will add this additional message. string

new ExitSafeguard()

This constructor is never used explicitly.

Extends

Members

Methods

Add/replace CSS class(es) for this control
Name Type Description
name string CSS class name(s) to add to the control. Separate class names by a space if more than one class.
replaced string optional CSS class name(s) to be replaced by the first argument. Separate class names by a space if more than one class.
Example
Button.addClass("green");

getChallengeMessage(){string}

Gets the message that will be displayed when challenging an exit
Returns:
Type Description
string

getType(){string}

Get descriptive string representing the type of control/section
Returns:
Type Description
string
Indicates bound status of control.
Returns:
Type Description
boolean True if the control is bound to coach data.
Checks if the view is enabled or not
Returns:
Type Description
boolean Enabled status
Example
var enabled = MyView.isEnabled();

isExitChallenged(){boolean}

Return whether or not exit is challenged by default
Returns:
Type Description
boolean
Propagates value change of control up through parent views
Name Type Description
event Event Value change event (usually an onchange event)
Returns:
Type Description
boolean True if a formula update was triggered on the control's parent, otherwise false
Example
MyView.propagateUp(event);

setChallengeMessage(msg)

Sets the message that will be displayed when challenging an exit
Name Type Description
msg string Message to be displayed

setExitChallenged(flag)

Set whether or not an exit is challenged by default
Name Type Description
flag boolean Set to true to challenge exit by default
Broadcasts the expression trigger for the specified view
Name Type Default Description
phase int bpmext.ui.PHASE_NORMAL optional The phase we are currently in
Example
MyView.triggerFormulaUpdates();