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



Jul 2, 2011, 4:22 AM
24 Posts
topic has been resolvedResolved

Get the http response and close the window

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.1
  • Role: Developer
  • Tags: http response,close the window
  • Replies: 2
In a XPage, I want the page closed after a button is clicked and some ssjs is run. I tried to get the http response and write a snippet of js in it. I used
var writer = facesContext.getResponseWriter();
in the onclick event handler of the button but always got a null.
Anyone can help me get the response writer or achieve the close window task? Thanks.
Jul 4, 2011, 10:29 AM
5 Posts
Re: Get the http response and close the window
 
 
 Hi, if you need to make access to the login window, you can help the following code:
 
var ServerName:string = facesContext.getExternalContext().getRequest().getServerName()
var externalCtx = facesContext.getExternalContext();
externalCtx.redirect(ServerName+"/TestFolder/Test.nsf?logout&redirectTo="+facesContext.getExternalContext().getRequestContextPath()); //  in parentheses indicate the path to the database
Jul 14, 2011, 3:13 AM
24 Posts
Re: Get the http response and close the window
I have used a work-around to achieve the goal. Redirect to a specific page to show a message and a close button.
However I still cannot get the http response object.

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