dumpObject - Dump Object

Displays the content of one or more objects.

Category

Extension Library

Syntax

<xe:dumpObject attributes>content</xe:dumpObject>
Table 1. Essential properties
Property Description
id Defaults to dumpObject1, dumpObject2, and so on.
levels Specifies the level of child elements to display. Defaults to 999.
maxGridRows Specifies the maximum number of rows to display.
objectNames Specifies a list of comma separated object names.
startFilter Filters object properties that start with the specified value.
title Provides a title for the display. Defaults to Object Dump.
useBeanProperties Specifies whether bean access should be used. Defaults to false.
value Specifies the object to be displayed.
Table 2. All properties
Category Properties
basics binding, id, levels, loaded, maxGridRows, objectNames, rendered, rendererType, startFilter, title, useBeanProperties, value
styling disableTheme, themeId

Usage

This control is intended as a debugging tool.

Examples

This page contains an afterPageLoad event, a button, and a dump object control. When the page first opens, the NotesDocument object for the first document in the application is displayed. Clicking the button displays subsequent documents.
<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>
This page displays the NotesDocument objects for the first two documents in the application.
<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>
This page displays the NotesDocument objects for all documents in the application.
<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>