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 12, 2013, 8:50 PM
9 Posts

Return the user to the original document using SSJS

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role:
  • Tags: History
  • Replies: 3
How to use  the Server-side JavaScript to return the user back to the page from where they opened a document?
Mar 12, 2013, 10:56 PM
586 Posts
Re: Return the user to the original document using SSJS
This might be helpful
 
http://stackoverflow.com/questions/11251232/redirect-to-opendocument-from-editdocument-in-xpages 
Mar 14, 2013, 1:59 PM
9 Posts
Re: Return the user to the original document using SSJS
David, 
 
Thanks for providing the link, 
 
is it possible to return the user from where the user has opened the document.?
 
for example, the user opened a main document and moved onto the response document from the main document through a button click or something, now if the user clicks on the cancel button on the response document then the user should be returned to the main document with the values already entered by the user on the main document.
 
 
  
Mar 14, 2013, 5:43 PM
586 Posts
Re: Return the user to the original document using SSJS
 I'm not sure what you mean by: 
 
 with the values already entered by the user
 
 and I've never used actual response documents in XPages.  I just relate documents via a shared key.  that's so much better.  In a new XPage application I see no need to use true response documents.  Also it sounds like you're doing a lot of full page switching like you would expect in notes client.  You don't need to do full page switching as much potentially as you can use a dialogbox, dynamic content control, or even just hide and unhide a panel with your child fields in it.  Of course I don't know your design so that's just something to think about.
 
As to your actual question...  If you're in an XPage and you want to remember where you were... before you navigate away you can store a value in a sessionScope var...  you could store the whole URL I guess though I'd be more inclined to store the unid...  then when you want to return  you just build your URL and redirect to that.  The URL would look like what's in your browser now for the forum:
 
 http://www-10.lotus.com/ldd/xpagesforum.nsf/topicThread.xsp?action=openDocument&documentId=E83265CA8D48DF3085257B2C0072740D
 
just build that with code passing in the unid from your scoped variable. 
 
I have a crappy little online URL cheatsheet that might be helpful for building URLs...  http://xpagescheatsheet.com/cheatsheet.nsf/url.xsp 
 
Good Luck 

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