title: Creating response doc from a selected document within a dataTable with XPages
body: <p>I try saving my document the document got saved without any error but the response document is no where to be found. The response document is a list of document in a datatable selected using a checkbox. The below code is placed on the  onchange event of the checkbox:</p>
  
  <pre><code>&lt;xp:checkBox id="checkBox1" value="#{vProductListCollection}"&gt;
                                  &lt;xp:eventHandler   event="onchange" submit="true" refreshMode="norefresh"
                                      id="eventHandler1"&gt;
                                      &lt;xp:this.action&gt;&lt;![CDATA[#{javascript:
  var colTitle = vProductListCollection.getColumnValue("Title");
  var prodTitle = viewScope.get("title");
  var docId = viewScope.get("id");
  
  var selDocID = vProductListCollection.getUniversalID();
  
  if(docId.contains(selDocID )) {
  prodTitle.remove(colTitle );
  docId.remove(selDocID );
  } else {
  prodTitle.add(colTitle );
  docId.add(selDocID );
  }
  }]]&gt;&lt;/xp:this.action&gt;
                                  &lt;/xp:eventHandler&gt;
                              &lt;/xp:checkBox&gt;
  </code></pre>
  
  <p>Postopen event:</p>
  
  <pre><code>var titleList = new java.util.ArrayList();
  ViewScope.put('title', titleList );
  var idList = new java.util.ArrayList();
  viewScope.put('id', idList );
  </code></pre>
  
  <p>On my submit botton (to create response doc for NEW main document)  i have:</p>
  
  <pre><code>currentDocument.save()
  var TL:java.util.ArrayList = viewScope.get("title");
  var Id:java.util.ArrayList=viewScope.get("id");
  for(var x=0;x&lt;Id.size();x++){
   var doc=database.getDocumentByUNID(Id.get(x)); 
   var resdoc:NotesDocument=doc.copyToDatabase(database);
   resdoc.makeResponse(currentDocument.getDocument());
   resdoc.save();
  }
  </code></pre>
  
  <p>When i submit my main document got saved but without the responce document, and hint?</p>