dumpObject - オブジェクトのダンプ

1 つ以上のオブジェクトのコンテンツを表示します。

カテゴリ

拡張ライブラリ

構文

<xe:dumpObject attributes>content</xe:dumpObject>
表 1. 必須プロパティ
プロパティ 説明
id デフォルトは dumpObject1dumpObject2 などです。
levels 表示する子要素のレベルを指定します。 デフォルトは 999 です。
maxGridRows 表示する最大行数を指定します。
objectNames コンマで区切られたオブジェクト名のリストを指定します。
startFilter 指定した値で始まるオブジェクトプロパティをフィルタリングします。
title 表示するタイトルを指定します。デフォルトはオブジェクトダンプです。
useBeanProperties Bean アクセスを使用するかどうかを指定します。デフォルトは false。
value 表示するオブジェクトを指定します。
表 2. すべてのプロパティ
カテゴリ プロパティ
basics bindingidlevelsloadedmaxGridRowsobjectNamesrenderedrendererTypestartFiltertitleuseBeanPropertiesvalue
styling disableThemethemeId

使用法

このコントロールは、デバッグツールとして使用します。

以下のページには、afterPageLoad イベント、ボタン、ダンプオブジェクトコントロールが含まれています。このページが初めて開くと、アプリケーション内の最初の文書の NotesDocument オブジェクトが表示されます。ボタンをクリックすると、後続の文書が表示されます。
<xp:this.afterPageLoad>
	<![CDATA[#{javascript:requestScope.doc = database.getAllDocuments().getNthDocument(1);
	sessionScope.n = 1}]]>
</xp:this.afterPageLoad>
<xp:button value="Get next document" id="button1">
	<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="dumpObject1">
		<xp:this.action><![CDATA[#{javascript:var n = ++sessionScope.n;
		var doc:NotesDocument = database.getAllDocuments().getNthDocument(n);
		if (doc == null) {
			n = 1;
			doc = database.getAllDocuments().getNthDocument(n);
		}
		requestScope.doc = doc;
		sessionScope.n = n}]]>
		</xp:this.action>
	</xp:eventHandler>
</xp:button>
<xp:br></xp:br>
<xe:dumpObject id="dumpObject1" value="#{javascript:return requestScope.doc}">
	<xe:this.title><![CDATA[#{javascript:if (requestScope.doc == null)
		return "No document"
	else
		return "Document " + sessionScope.n
	}]]>
	</xe:this.title>
</xe:dumpObject>
以下のページは、アプリケーション内の最初の 2 つの文書の NotesDocument オブジェクトを表示します。
<xe:dumpObject id="dumpObject1" title="First two documents">
	<xe:this.value>
		<![CDATA[#{javascript:
			return [database.getAllDocuments().getFirstDocument(), database.getAllDocuments().getNthDocument(2)]
		}]]>
	</xe:this.value>
</xe:dumpObject></xp:view>
以下のページは、アプリケーション内のすべての文書の NotesDocument オブジェクトを表示します。
<xe:dumpObject id="dumpObject1" title="All documents">
	<xe:this.value>
		<![CDATA[#{javascript:var dc:NotesDocumentCollection = database.getAllDocuments();
		var doc:NotesDocument = dc.getFirstDocument();
		var docs = new Array();
		while (doc != null) {
			docs.push(doc);
			doc = dc.getNextDocument(doc);
		}
		return docs}]]>
	</xe:this.value>
</xe:dumpObject>