i have an issue that it gives me some headache lately.
In my XPage there is a view displaying some docs ( let say Pdoc
as datasource ) and I open/create them inside a <xe:dialog>
. This dialog has only Pdoc
declared as datasource, and it inherits some values from the Xpage datasrouce. My clickable column formula is:
// some var declarations
var formName = rowData.getDocument().getItemValueString("Form");
if ( formName == "fmP" )
{ viewScope.put("dlgDocUnid", pe.getUniversalID())
getComponent("exampleDialog").show(); }
On the same XPage, I can create a new Pdoc
using the same dialog via a button, New Pdoc
.
The problem is: when I opened an existing Pdoc
and then just save it or close it, and after I use the button to create a newNote => the old / previous ( already saved Pdoc
) is showed...
If firstly I just created a new note Pdoc
, it works, and it is showing a new empty Pdoc.
My dialog data code:
<xp:this.data>
<xp:dominoDocument var="Pdoc" formName="fmPersContact"
ignoreRequestParams="true" scope="request" action="editDocument">
<xp:this.documentId><![CDATA[#{javascript:viewScope.get("dlgDocUnid");}]]></xp:this.documentId>
</xp:dominoDocument>
</xp:this.data>
I use the .documentId
for the open method from the viewPanel. I think here is the problem. I think ,( I'm not sure), I should compute this documentId in such way that when I create a newNote this documentID shouldn't be anymore the viewScope.get("dlgDocUnid")
.
Thanks for your time.