I am trying to open a second page (non xpage) from a xpage script:
var docId=docIDArray[0];
var doc=database.getDocumentByID(docId);
var vurl = doc.getItemValue(“vurl”);
var extCont:javax.faces.context.ExternalContext = facesContext.getExternalContext();
var vrl:String = vurl[0].toString();
extCont.redirect(vrl);
This replaces the current window, how do I open it in a new window
Thanks
Neil
Subject: Open New Window
I think SSJS just allows you to manipulate the current context and not open a new page (currently, that is, I’ve heard talk about integrating with the CSJS window.open event in the future, though that may be for a different purpose).
I think at the moment you’ll need to call window.open. If this needs to pick up the outcomes of your SSJS, you could do it using the onComplete event in 8.5.1. I blogged about how to do that last week http://hermes.intec.co.uk/Intec/Blog.nsf/dx/21042010222252HERT3U.htm. I’ll probably add it to the XPages Blog over the weekend.
Subject: Thanks
That sounds like it would work perfectly I will give it a goThanks
Neil
Subject: Cant Find The OnComplete Event
Hi Paul,I am running 8.5.1
"IBM Lotus Domino Designer 8.5
Release 8.5.1
Revision 20090929.1223 (Release 8.5.1)
Standard Configuration"
but when i look in the all properties I don’t see those events
is there something i am missing
Thanks
Neil
Subject: Found It
Didn’t realise it was only visible after a script was created