This content has been archived.

Table of Contents

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 = {<br />
activity: activityJSObject,<br />
dataTransform: dataTransformJSObject,<br />
usePrimaryPage: true/false,<br />
url: "urlString",<br />
event: eventObject,<br />
windowProperties: {<br />
name: {value: "Page1.Prop1", isProperty: true/false},<br />
replaceHistory: true/false,<br />
height: number of pixels,<br />
width: number of pixels,<br />
top: number of pixels,<br />
left: number of pixels,<br />
resizable: true/false,<br />
scrollbars: true/false,<br />
locationbar: true/false,<br />
menubar: true/false,<br />
statusbar: true/false,<br />
toolbar: true/false<br />
}<br />
};

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.
Suggest Edit

66% found this useful

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.