This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 15, 2011, 8:37 PM
47 Posts

how can I cancel and reset/reload a document

  • Category: APIs
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 2
  Hi,
 
Can anyone direct me to the appropriate method to reset a document that may have had some values edited, but not yet saved, as per a cancel button? The page has multiple data sources so I cannot just redirect to reload the page. I have even tried using reflection to invoke the 'restoreWrappedDocument' method from com.ibm.xsp.model.domino.wrapped.DominoDocument, but that didn't seem to do anything... no error, just nothing changed.
 
Any ideas? 
 
Rich 
 
Mar 16, 2011, 4:39 AM
22 Posts
Can you not just reproduce the 'Cancel' functionality?
When you add a 'Cancel' button to your page, you can re-direct to the current page (I beleive)...
 
<xp:button value="Cancel" id="button1">
 <xp:eventHandler event="onclick" submit="true" immediate="true" save="false">
  <xp:this.action>
   <xp:openPage name="YourXPage"></xp:openPage>
  </xp:this.action>
 </xp:eventHandler>
</xp:button>
 
I think the important piece there is the the "immediate" parameter set to "true".
I believe this causes the inputted values to be discarded. 
 
Mar 17, 2011, 6:54 AM
47 Posts
Re: Can you not just reproduce the 'Cancel' functionality?
 Redirecting won't work for me because I have several datasources open on the same page and I don't want to lose the state on other open documents.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal