How can I pass a NotesDocument / NotesViewEntry collection to a custom control using a custom property?

I want to have a custom control that works on any documents I choose to submit. What's the best way to do this?

Assuming you cannot pass the collection directly ... should a function be created to convert the collection to a hashMap or UNID vector?

Is there another way?



source to share

2 answers

Passing NotesDocument and / or NotesDocumentCollection objects to Custom Control works fine. Just set the type of the Custom Control property to java.lang.Object. Thanks to this, you can transfer objects that have ever been to user control.



If you pass the data source instead, you get reinstall-safe objects that are passed to user control.

For example, if the XPage defines a document data source, and you pass a reference to that data source to CC, the Java object passed in is a DominoDocument, which is a recycle-free wrapper around the "back" of the document. Document transfer is directly related to the fact that the associated C object becomes an orphan between requests.

Likewise, passing a reference to the view data source provides CC a DominoView, which is essentially a recyclable wrapper around the appearance of the ViewEntryCollection.

In most cases, you can just pass the back end object directly, but passing the data source is much safer.



All Articles