i am new to xpages, but i want to try to create a response document for a main document which is the order document. there is a product document which display the view of all product in the database and with a checkbox, both document are on one page. using the below code on the onclick event if the checkbox
var colName = view1Collection.getColumnValue("Name");
var prodNameScope = sessionScope.get("scopeProdName");
var docIdScope = sessionScope.get("scopeDocID");
var selDocID = view1Collection.getUniversalID();
if(docIdScope .contains(selDocID )) {
prodNameScope .remove(colName );
docIdScope .remove(selDocID );
} else {
prodNameScope .add(colName );
docIdScope .add(selDocID );
}
Postopen event:
var nameList = new java.util.ArrayList();
sessionScope.put('scopeProdName', nameList );
var idList = new java.util.ArrayList();
sessionScope.put('scopeDocID', idList );
On the next pages the item displayed well, but i want the selected item to be copied and save as a response document to the main document.
i have tried the below script but did not work:
var PN = sessionScope.get("scopeProdName[indexRowdata]");
document1.replaceItemValue("_Title", PN);
anyone have idea how i could go about this. thanks in advance.