FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



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.

FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.