Save Data Sources (Simple actions)

Saves all the data sources on the current page and opens a new page.

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.
save "name=string"
Arguments Description UI presentation
name Name of a page in the component. The replacement page takes the format of the component page specified here. 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.

Usage

In a page with one data source and a panel on that page with a different data source, this simple action saves both data sources.

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.

The page below has a data source, an edit box, and a button with a Save Data Sources simple action. It also contains a panel that contains a separate data source and an edit box. The button saves data typed in both the page edit box and panel edit box, and replaces the page with page0.

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

	<xp:this.data>
		<xp:dominoDocument var="document1" formName="form0"></xp:dominoDocument>
	</xp:this.data>
	<xp:inputText id="inputText1" value="#{document1.field0}"></xp:inputText>
	<xp:br></xp:br>
	<xp:panel style="height:190.0px">
		<xp:this.data>
			<xp:dominoDocument var="document2" formName="form1"></xp:dominoDocument>
		</xp:this.data>
		<xp:inputText id="inputText2" value="#{document2.field0}"></xp:inputText></xp:panel>
	<xp:button value="Save All" id="button1"><xp:eventHandler event="onclick" submit="true" refreshMode="complete">
	<xp:this.action>
		<xp:save name="/page0.xsp"></xp:save>
	</xp:this.action></xp:eventHandler></xp:button></xp:view>