How to properly synchronize DominoDocument(from data source) with Document (underlying one) ?
On xPages I have a several fields and button that calls my JAVA code (with Full refresh). I'm sending the DominoDocument to code as parameter to access document values. The code snippet is below.
Now in my code co access the underlying document with updated values I have to call DominoDocument.getDocument(true); with parameter 'true' to apply changes from frontend to backend. Then a have to make some changes to this underlying document but after page refresh, I could not see the updated values in appropriate fields. I found out, that I have to apply changes from underlying document back do DominoDocument. I was trying several ways when finished on using DominoDocument .setDocument(Document); . Is it proper way how to manipulate with DominoDocument and Document objects? It seems a bit complicated to me ...
public void selectManager(DominoDocument uidoc) throws NotesException{
Document cdoc=uidoc.getDocument(true);
# .... some field updates on cdoc
uidoc.setDocument(cdoc);
}