Links may not function; however, this content may be relevant to outdated versions of the product.
openURLInWindow: Public JS API for control actions
openURLInWindow
Open a URL in a browser window. The URL can either be a external URL or an internal (same domain) URL navigated through an activity or data transform.
Syntax
var options = {
activity: activityJSObject,
dataTransform: dataTransformJSObject,
usePrimaryPage: true/false,
url: "urlString",
event: eventObject,
windowProperties: {
name: {value: "Page1.Prop1", isProperty: true/false},
replaceHistory: true/false,
height: number of pixels,
width: number of pixels,
top: number of pixels,
left: number of pixels,
resizable: true/false,
scrollbars: true/false,
locationbar: true/false,
menubar: true/false,
statusbar: true/false,
toolbar: true/false
}
};
pega.api.ui.actions.openURLInWindow(options);
Parameters
This API accepts a JavaScript object which can have the following key-values.
- activity: This is a JS object with the following key-values. This activity should return an HTML stream that displays in the opened window. This activity is processed after a data transform.
{name: “activityName", parameters: [{name: "param1", value: "Page1.prop1", isProperty: true}, {name: "param2", value: 123, isProperty: false}]}.
- dataTransform: Optional. This is a JS object with the following key-values.
{name: “dataTransformName", parameters: [{name: "param1", value: "Page1.prop1", isProperty: true}, {name: "param2", value: 123, isProperty: false}]}
- usePrimaryPage: Optional. Set this to invoke an activity based on the contents of the primary page. The default value is false.
- url: Optional. This is a string which specifies a URL to launch in browser window. When set, activity, dataTransform and usePrimaryPage are ignored.
- windowProperties: Optional. This is a JS object with the list of window properties. The default value for all Boolean properties is false.
- event: The event refers to a DOM event object.