Delete Document (Simple actions)

Deletes the current document and opens a new page.

Defined in

Simple actions

Type of simple action

Document (Server)

Syntax

Note: This is the XSP source code. The UI presents the simple action as a dialog with a box for each argument.
deleteDocument name="string" message="string"
Arguments Description UI presentation
name Name of the page to open after deleting the current document. A list of existing component pages plus the diamond icon. You can select from the list or click the diamond to dynamically compute the value.
message Prompts the user with a confirmation message. The user responds with OK to continue or Cancel to exit. An edit box plus the diamond icon. You can type a message in the field or click the diamond to dynamically compute the value.

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 opens a dialog with the text "Delete the document?" and OK and Cancel buttons. If the user clicks OK, the current document is deleted and page1 replaces the current page.
<xp:button value="Delete Document" id="button1" 	style="width:143.0px">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
	<xp:deleteDocument name="/page1.xsp" 
		message="Delete the document?">
	</xp:deleteDocument>
</xp:this.action></xp:eventHandler></xp:button>