只保存文檔
Save Document (Simple actions - JavaScript)
Saves the current document.
Defined in
Simple actions
Type
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.
saveDocument
Usage
This simple action saves the data sources associated with the document, but not other data sources on the page, for example, a
separate data source for a panel. See Save 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 Document simple action. It also contains a panel that
contains a separate data source, an edit box, and a button with a Save Document simple action. The Save Document actions only
save data for the page or the panel.
<?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:br></xp:br>