- I have an XPage built from custom controls. The main page has the datasource, one CC renders the form, and another renders the navigator associated with that form. The Action buttons are on the navigator, and one of them is the POX (plain old xpage):
<xp:panel styleClass=“lotusBtnContainer” style=“margin:2px 10px”>
<xp:link escape="true" text="Save and Exit" id="Save" rendered="#{javascript:Ticket.isEditable();}" outerStyleClass="lotusBtn lotusBtnAction">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action><xp:saveDocument/></xp:this.action>
</xp:eventHandler>
</xp:link>
</xp:panel>
which of course says “Save and Exit” in a pretty little button-looking link.
- I also have print() statements in the various dataSource events to see when they fire, and what “Ticket” is like in an event’s execution environment. Here’s what I get when I open a Ticket, edit it, then click “Save and Exit”:
HTTP JVM: qOD
HTTP JVM: pOD
HTTP JVM: - Opening ← Open in read mode
HTTP JVM: qOD
HTTP JVM: pOD
HTTP JVM: - Editing ← Clicked Edit button
HTTP JVM: qSD ← Running “saveDocument” action
HTTP JVM: - Editing ← Still in edit mode
HTTP JVM: pSD
HTTP JVM: - Editing ← Save is done
HTTP JVM: qOD ← Why does it reopen, post save?
HTTP JVM: pOD
HTTP JVM: - Editing ← And still in edit mode?
-
Searching the Forum for “saveDocument” yields six hit. Three are crashes. One is a remote install issue. One is Lothar asking how to do saves on the web that work with a RIM, and one is Luc having problems saving rich text. Luc’s save action on his button is identical to my save action on my link.
-
How does one save a document from a XPage and have it not return to edit mode? Check if it’s being saved in postSaveDocument and redirect it manually?
Thanks for your time…