0
上記のエラーが発生します。 次の文書がヌルかどうかを確認する方法はありますか?以下 が私のコードです:Xpages - 例外が発生しましたNotesView.getNextDocument(lotus.domino.local.Document)null
var vec:NotesView = database.getView("QueryNotes");
var queryColl:NotesDocumentCollection = vec.getAllDocumentsByKey(ProjectUNID,true);
if(queryColl.getCount() > 0){
var queryDoc1:NotesDocument = queryColl.getFirstDocument();
while (queryDoc1 != null) {
if(!queryDoc1.hasItem("QueryEndDate")){
queryDoc1.appendItemValue("QueryEndDate", session.createDateTime(@Now()));
var tmpdoc = vec.getNextDocument(queryDoc1); //error when next is null, or does not exist
queryDoc1.recycle();
queryDoc1 = tmpdoc;
}
}
}
チェックの方法があるはず、stackoverflowの上で同様のquestionが質問に答えませんでした。
あなたのお返事をお待ちしております。
これは1つの問題です。もう1つは、if文の中で反復処理(getNext、recycle ...)を扱っています... –
良い点@FrantisekKossuth –
ありがとうございました。 –