Hi @All,
I'm trying to put a NotesDocumentCollection into a sessionScope. Therefore I have a simple XPage with two buttons.
Button one includes the following code in the onClick Event:
var nvwLookup:NotesView = session.getCurrentDatabase().getView("myView");
var colLookup:NotesDocumentCollection = nvwLookup.getAllDocumentsByKey("Whatever");
sessionScope.put("myCol", colLookup);
Button two includes the following code in the onClick Event:
var colScope:NotesDocumentCollection = sessionScope.get("myCol");
if(colScope != null){
print(colScope.getCount());
}
After I hit button one, the collection was put into the sessionScope. I cross checked this with the "Xpages Debug Custom Control". Thx to Ferry for this great control.
If I hit button two I get an exception at the print statement: Exception occurred calling method NotesDocumentCollection.getCount() null
Any ideas what I'm doing wrong or is there just no way to put a NotesDocumentCollection into a scope variable?
I'm using 8.5.2 FP2
Thx for helping me.