Confirm Action (Simple actions)

Confirms an action.

Defined in

Simple actions

Type of simple action

Basic (Server)

Syntax

Note: This is the XSP source code. The UI presents the simple action as a dialog with a box for each argument.
confirm message="string"
Arguments Description UI presentation
message Confirmation text to be displayed to the user. An edit box plus the diamond icon. You can type a string into the field or click the diamond to dynamically compute the value.

Usage

This simple action is typically used in a simple action group. It presents the user with a dialog box containing the message and two buttons:
  • The OK button causes processing of the simple action group to proceed.
  • The Cancel button causes processing of the simple action group to stop.

Alternatively you can write client and server scripts for the same event. Returning true from the client script allows the server script to execute. Returning false causes an immediate exit.

Examples

Note: These examples present XSP source code which can be inserted under the Source tab taking care to keep the XML well formed. To use the UI, select or enter the arguments in the simple action dialog.
This button presents a confirmation dialog before opening a new page.
<xp:button value="Label" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
	<xp:actionGroup>
		<xp:confirm message="Do you want to proceed?"></xp:confirm>
		<xp:openPage name="/page1.xsp" target="newDocument"></xp:openPage>
	</xp:actionGroup>
</xp:this.action></xp:eventHandler></xp:button>