Nov 16, 2012, 2:02 AM
129 Posts

Re: Open XPage with a key, not a UNID?

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 5
Computing the UNID for the document data source is probably the only way, as the data source needs the UNID.
Another way would be to wrap the document in a bean, but you would probably run into "object has been recycled" issues. 
What I tend to do is to have a object classes which represents the documents and a controller bean that handles events/validation for each kind of document. The controller bean uses a generalized DAO (Data Access Object) class to  pull/push data to the server on load/save. It takes a lot more time to write, but you also get a lot more control.