This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!window.JSM) { | |
window.JSM = {}; | |
} | |
// C-style include protection | |
if (!window.JSM.setSearchOperator) { | |
window.JSM.setSearchOperator = function () { | |
'use strict'; | |
// The value for "between" is 9. Change this to your desired |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* RequireJS global configuration. Include after RequireJS in branding settings | |
* | |
* @returns {undefined} | |
*/ | |
(function () { | |
/** | |
* Build a URL based on the current component's URL | |
* @param {type} scriptId | |
* @returns {String} derived URL for JavaScript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Employees": [{ | |
"Name": { | |
"First": "Jim", | |
"Last": "Marion", | |
"Middle": "J" | |
}, | |
"ID": 123456 | |
}, { | |
"Name": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Change homepage background color */ | |
#PT_WRAPPER.pt_homepage { | |
background-color: #eee /* f0f0f0*/; | |
} | |
/* Change tile border style and tile background color */ | |
#PT_WRAPPER.pt_homepage .nuitile .nuilp { | |
border-radius: 0; | |
box-shadow: none; | |
border: 1px dashed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local string &script; | |
Local JavaObject &manager = CreateJavaObject("javax.script.ScriptEngineManager"); | |
Local JavaObject &engine = &manager.getEngineByName("JavaScript"); | |
SQLExec("SELECT CONTDATA FROM PSCONTENT WHERE CONTNAME = :1", HTML.JSM_CREATE_ROLE_JSON, &script); | |
REM ** The JavaScript expects the role name to be a global variable; | |
&engine.put("roleName", "Compensation Administrator"); | |
&engine.eval(&script); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var result = (function() { | |
var ReflectiveArray = java.lang.reflect.Array; | |
var SQLExec = Packages.PeopleSoft.PeopleCode.Func.SQLExec; | |
var CreateSQL = Packages.PeopleSoft.PeopleCode.Func.CreateSQL; | |
var parms = ReflectiveArray.newInstance(java.lang.Class.forName("java.lang.Object"), | |
2 /* number of selected columns */); | |
var columns = ReflectiveArray.newInstance(java.lang.Class.forName("java.lang.Object"), | |
1 /* number of selected columns */); | |
parms[0] = roleName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local JavaObject &jsonStr = CreateJavaObject("java.lang.String", &jsonText); | |
Local JavaObject &constructorArgTypes = CreateJavaObject("java.lang.Class[]", &jsonStr.getClass()); | |
rem Local JavaObject &jsonClass = GetJavaClass("org.json.JSONObject"); | |
rem Local JavaObject &constructor = &jsonObject.getClass().getConstructor(&constructorArgTypes); | |
Local JavaObject &jsonClass = CreateJavaObject("org.json.JSONObject").getClass(); | |
Local JavaObject &constructor = &jsonClass.getConstructor(&constructorArgTypes); | |
Local JavaObject &parserObject = &constructor.newInstance(CreateJavaObject("java.lang.Object[]", &jsonStr)); | |
Local JavaObject &roleJson = &jsonClass.cast(&parserObject); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local JavaObject &jsonRole = CreateJavaObject("org.json.JSONStringer"); | |
Local string &roleName = "Compensation Administrator"; | |
Local string &roleDescr; | |
Local string &permId; | |
Local string &jsonText; | |
Local SQL &perms; | |
REM ** Create JSON structure...; | |
SQLExec("SELECT DESCR FROM PSROLEDEFN WHERE ROLENAME = :1", &roleName, &roleDescr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local JavaObject &jsonRole = CreateJavaObject("org.json.JSONObject"); | |
Local JavaObject &jsonPerms = CreateJavaObject("org.json.JSONArray"); | |
Local string &roleName = "Compensation Administrator"; | |
Local string &roleDescr; | |
Local string &permId; | |
Local string &jsonStr; | |
Local SQL &perms; | |
REM ** Create JSON structure...; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Local string &script; | |
Local JavaObject &manager = CreateJavaObject("javax.script.ScriptEngineManager"); | |
Local JavaObject &engine = &manager.getEngineByName("JavaScript"); | |
SQLExec("SELECT CONTDATA FROM PSCONTENT WHERE CONTNAME = :1", HTML.JSM_READ_XLS_JS, &script); | |
REM ** Tell JavaScript what file to process; | |
&engine.put("fileName", "c:/temp/roles.xlsx"); | |
&engine.eval(&script); |