This content has been archived and is no longer being maintained.

Table of Contents

Article

getDataPage: Public JS API for control actions

getDataPage

Get the data page data from the clipboard in JSON form

Syntax

var options ={<br />
name: “dataPageName ",<br />
parameters: [{name: "
param1", value: "Page1.prop1", isProperty: true}, {name: "param2", value: 123, isProperty: false}],<br />
callback: callbackFunc,<br />
event: eventObject<br />
};<br />
function callbackFunc(resultJSON){<br />
console.log(resultJSON)<br />
}

The sample blow shows the JSON obtained from the data page.

{"pzPageNameBase":"Declare_LoadEmployees",<br />
"pzPageNameHash":"_pa235705995598112pz",<br />
"pzPageToDisplay":"Declare_LoadEmployees",<br />
"pxDPParameters":{<br />
"EmployeeName":"(null/empty)"<br />
}<br />
,"pxResults":[<br />
{<br />
"pxObjClass":"Data-UIGallery-RepeatingLayouts-EmployeeDetails"<br />
,"pyDateOfBirth":"19790115"<br />
,"pyEmployeeID":"100298"<br />
,"pyEmployeeType":"Full Time"<br />
,"pyExperience":"8.2"<br />
,"pyGender":"Female"<br />
,"pyName":"Abigail Lippman"<br />
,"pyRole":"Site Services"<br />
}<br />
,{<br />
"pxObjClass":"Data-UIGallery-RepeatingLayouts-EmployeeDetails"<br />
,"pyDateOfBirth":"19860529"<br />
,"pyEmployeeID":"103986"<br />
,"pyEmployeeType":"Full Time"<br />
,"pyExperience":"2.4"<br />
,"pyGender":"Female"<br />
,"pyName":"Amanda Jones"<br />
,"pyRole":"Tech Services"<br />
}]

}

pega.api.ui.actions.getDataPage(options);

Parameters

This API accepts a JavaScript object which can have the following key-values.

  • name: The name of the data page.
  • parameters: Optional. Array of the data page parameters in JSON format.
  • callback: Callback function to be called with the resulting data from the data page.
  • event: The event refers to a DOM eventObject.

Published February 15, 2017 — Updated April 6, 2017


100% found this useful

Have a question? Get answers now.

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