This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jan 25, 2012, 5:26 PM
2 Posts

Code to save a document

  • Category: Custom JSF code (Eclipse IDE)
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 4
 Hi
I'm starting with xPages and there is a lot of confusion  in my mind.
I learn a lot by examples and I saw a wonderful article to create a master detail document (http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=E3856FFEDC3DD531852578CB0066C836) using JSF (I had previous experience with JSP and JSF was not difficult to understand).
Now I need to create a document for each Country saved on that vector.
Any Tip, Code or Link will be appreciated.
Thank you. 
Jan 26, 2012, 8:28 AM
9 Posts
Re: Code to save a document
 In code something like. 
 
(after newCountry.save() ).  
 -----
 var doc:NotesDocument = database.createDocument();
doc.replaceItemValue("form","YOURFORMNAME"); 
// Add your fields.  
doc.save(); 
 ---
 You will need to do doc.recycle() after the save if you are creating these in a loop. 
Jan 27, 2012, 8:09 PM
586 Posts
Re: Code to save a document
 If you like examples there are a bunch from NotesIn9 at XPages.TV.
 
:-) 
Feb 3, 2012, 2:52 PM
2 Posts
Re: Code to save a document
Thank you Simon. I think I got it.
David Leedy, I already spent some hours in NotesIn9. Congratulations for this great contribuiton.
But this this specific problem, is there any easier way to have a master detail working (with less java code)?
 
Apr 10, 2012, 6:58 PM
586 Posts
Re: Code to save a document
 If you haven't solved this, please let me know and I'll try and come up with a demo for you.
 
 Twitter: @DavidLeedy

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal