createViewNavFromDescendants (NotesView - JavaScript)

Creates a view navigator for all the descendants of a specified entry.

Defined in

NotesView

Syntax

createViewNavFromDescendants(entry:any) : NotesViewNavigator

createViewNavFromDescendants(entry:any, cacheSize:int) : NotesViewNavigator

Parameter Description
entry A NotesDocument or NotesViewEntry object representing the parent entry. Cannot be null.
cacheSize The size of the navigator cache in view entries. Legal values are 0 (no cache) through 128 (default). Applies only to remote (IIOP) operations.
Return value Description
NotesViewNavigator The new view navigator.

Usage

The entries in the navigator are the entries in the view that fall hierarchically at all levels under the specified entry. The parent itself is excluded.

If the entry has no children, the result is an empty navigator. All navigation methods return null.

The cache enhances performance for iterative processing of entries using the navigation methods that do not take a parameter.

Examples

This button gets all the entries in a view for descendants of the current document.
var v:NotesView = database.getView("main");
var nav:NotesViewNavigator = v.createViewNavFromDescendants(currentDocument.getDocument());
if (nav.getCount() == 0) {
	requestScope.status = "No descendants";
	return;
}
var entry:NotesViewEntry = nav.getFirst();
while (entry != null) {
	requestScope.status += "\n" + 
		entry.getColumnValues().elementAt(0);
	var tmpentry = nav.getNext();
	entry.recycle();
	entry = tmpentry;
}