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



Aug 6, 2012, 9:20 PM
19 Posts
topic has been resolvedResolved

xPages xe:dialog

  • Category: Dojo and Client Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: Dialog box in X pages
  • Replies: 2
I have an xPage that displays a dialog box.  When the user clicks OK or Cancel my code executes and all is well.
If the user presses the Escape Key or Clicks the X on the dialog box I want to execute the same code as a Cancel Button.
I want to redirect the user to the parent page on Cancel.
 
I found the onHide event of the dialog box ( which is CSJS ).  In my code below, the first alert fires but neither  forms of redirects work nor does the second alert(...).
Does anyone know how to redirect the browser from CSJS ?

<xe:this.onHide><![CDATA[
if( "#{javascript:viewScope.reloadParent}" == "yes" )
{
    alert( "before" );
//    externalCtx = facesContext.getExternalContext();
//    externalCtx.redirect("http://www.liebermanmanagement.com");
    var url = "/xpVendorApplication.xsp";
    context.redirectToPage(url);
    alert( "after" );
}
]]></xe:this.onHide>
Aug 7, 2012, 7:39 PM
586 Posts
Re: xPages xe:dialog
 context.redirectToPage is SSJS... so you can't use that in client side...
 
I'm not a Client side expert but wouldn't you want something like: 
 
window.location = "http://mySite.com"
 
 
Aug 7, 2012, 9:54 PM
19 Posts
Re: xPages xe:dialog
Thanks David that worked!
 
Your awesome!

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