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:
<xp:checkBox id="checkBox1" value="#{vProductListCollection}">
<xp:eventHandler event="onchange" submit="true" refreshMode="norefresh"
id="eventHandler1">
<xp:this.action><![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 );
}
}]]></xp:this.action>
</xp:eventHandler>
</xp:checkBox>
Postopen event:
var titleList = new java.util.ArrayList();
ViewScope.put('title', titleList );
var idList = new java.util.ArrayList();
viewScope.put('id', idList );
On my submit botton (to create response doc for NEW main document) i have:
currentDocument.save()
var TL:java.util.ArrayList = viewScope.get("title");
var Id:java.util.ArrayList=viewScope.get("id");
for(var x=0;x<Id.size();x++){
var doc=database.getDocumentByUNID(Id.get(x));
var resdoc:NotesDocument=doc.copyToDatabase(database);
resdoc.makeResponse(currentDocument.getDocument());
resdoc.save();
}
When i submit my main document got saved but without the responce document, and hint?