How to pass the Document context in Xpages while calling an Agent? In Xpage, I am in need of calling a java agent with documentcontext from my Xpage, And also I am in need of passing my current document as a parameter...
In Lotuscript we can do it as easily without saving the current document, but in Xpage I am using the following code., document1 is a current document.
var agent=database.getAgent("AgentName");
agent.runWithDocumentContext(currentDocument.getDocument());
This code I am not able to get the values of my current document's items, but if I will use the following code,
var agent=database.getAgent("AgentName");
document1.save();
agent.runWithDocumentContext(currentDocument.getDocument());
I can get the item value of the current document... But I do not want to save the document, without saving the document I need to get the item value of item.
Please give any nice solution for that...