I have Save & Close button that is supposed to save current document and navigate to Home page.
The problem that it doesn't save the document (the doc is in edit mode). If I set button property submit="true" then it does save the doc by makes a replication conflict.
<xp:button id="buttonSaveClose">
<xp:this.value><![CDATA[Save & Close]]></xp:this.value>
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
<xp:this.action>
<xp:actionGroup>
<xp:saveDocument
var="#{javascript:document1}">
</xp:saveDocument>
<xp:openPage name="/Home.xsp">
</xp:openPage>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:button>
Just delete <xp:saveDocument ... </xp:saveDocument>
.
You already set event handler's save
-parameter to true
and the document gets saved automatically. No need to save it a second time with a save action.