NotesXspDocument (JavaScript)

サーバースクリプトが実行されている XPage のコンテキストに関連する文書を表します。

使用法

XPage のデータソースが Domino® 文書の場合、そのデータソースを表す NotesXspDocument 型のグローバル変数が使用可能になります。デフォルトでは、ページ上で文書データソースを表すグローバル変数には document1document2 という形で名前が付けられます。
currentDocument という名前のグローバル変数は、最も近いデータソースを表します。例えば、ページのパネルコントロールのデータソースは document2 で、ページ自体のデータソースは document1 だとします。パネルコントロール外部では、currentDocumentdocument1 を意味します。 パネルコントロール内部では、currentDocumentdocument2 を意味します。
Domino データストア内にある文書を直接処理するには、NotesDocument を使用します。

以下の Open シンプルアクションは、条件を設定するスクリプト、および対象を指定するスクリプトを使用します。
<xp:button id="button1" value="Open parent"><xp:eventHandler event="onclick" submit="true" refreshMode="complete"><xp:this.action>
	<xp:actionGroup
			condition="#{javascript:document1.isResponse()}">
			<xp:openPage name="/main.xsp"
				target="#{javascript:return document1.getParentId()}">
			</xp:openPage>
	</xp:actionGroup>
</xp:this.action></xp:eventHandler></xp:button>