Get ViewEntries in random order and loop them in XPage without Repeat


var tempTreeMap:java.util.TreeMap = new java.util.TreeMap();
var tempColl:NotesViewEntryCollection = viewName.getAllEntries();
var tempEntry:NotesViewEntry = tempColl.getFirstEntry();
var tempCollection:java.util.Collection = null;
				
while (tempEntry != null) {
	tempTreeMap.put(@Unique(), tempEntry.getDocument());					
	tempEntry = tempColl.getNextEntry(tempEntry);
}
				
tempCollection = tempTreeMap.values();
return tempCollection.iterator();
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...