createViewNavFromChildren (NotesView - JavaScript™)
Creates a view navigator for the immediate children of a specified entry.
Defined in
NotesViewSyntax
createViewNavFromChildren(entry:any)
: NotesViewNavigator
createViewNavFromChildren(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 all the entries in the view that fall hierarchically at the next level under the specified entry. The parent entry 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 children of the current document.var v:NotesView = database.getView("main");
var nav:NotesViewNavigator = v.createViewNavFromChildren(currentDocument.getDocument());
if (nav.getCount() == 0) {
requestScope.status = "No children";
return;
}
var entry:NotesViewEntry = nav.getFirst();
while (entry != null) {
requestScope.status += "\n" +
entry.getColumnValues().elementAt(0);
var tmpentry = nav.getNext();
entry.recycle();
entry = tmpentry;
}