getPrevSibling (NotesViewNavigator - JavaScript)

ビューナビゲータ内の現在のエントリまたは指定されたエントリの直前の同じレベルのエントリを返します。

定義場所

NotesViewNavigator

構文

getPrevSibling() : NotesViewEntry

getPrevSibling(entry:NNotesViewEntry) : NotesViewEntry

パラメータ 説明
entry ビュー内のエントリです。NULL にすることはできません。
戻り値 説明
NotesViewEntry 現在のエントリまたは指定されたエントリの直前にある同じレベルのエントリです。直前の同じレベルのエントリがない場合は NULL を返します。

使用法

このメソッドは、戻り値が null でない限り、現在のポインターを取得したエントリに移動します。

以下のボタンは、カテゴリ化されたビュー内のすべての最上位レベルのカテゴリエントリを逆順で取得します。
var nav:NotesViewNavigator = database.getView("By category").createViewNav();
var entry:NotesViewEntry = nav.getLast();
do {
	entry = nav.getCurrent();
} while (nav.gotoParent());
while (entry != null) {
	if (!entry.isTotal()) {
		requestScope.status += "¥n" +
		entry.getPosition(".") + " " +
		entry.getColumnValues().firstElement().toString() + " has" +
		entry.getDescendantCount().toFixed() + " total entries";
	}
	var tmpentry:NotesViewEntry = nav.getPrevSibling(entry);
	entry.recycle();
	entry = tmpentry;
}

言語間の参照

LotusScript® NotesView クラスの GetPrevSibling メソッド

Java™ View クラスの getPrevSibling メソッド