Created
June 23, 2020 18:02
-
-
Save bokks/0116c318bc216a2472c94d3dff356ae8 to your computer and use it in GitHub Desktop.
This is pattern for RedirectAndRun
This file contains 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
/* In case of RedirectAndRun where the Location parameter is also a URL */ | |
/* Both of them need to be encrypted */ | |
switchMyApps:function(accessGroup) { | |
if (accessGroup == null) { | |
return; | |
} | |
var topWinTmp; | |
var oShowDesktopUrl; | |
if (pega.ui.composer) { | |
topWinTmp = pega.ui.composer.getCurrentComposerWindow(); | |
oShowDesktopUrl = topWinTmp.SafeURL_createFromURL(pega.d.encryptedAppSwitch); | |
} else { | |
topWinTmp = top; | |
oShowDesktopUrl = SafeURL_createFromURL(pega.d.encryptedAppSwitch); | |
} | |
oShowDesktopUrl.put("AccessGroupName", accessGroup); | |
oShowDesktopUrl.put("Location",pega.d.encryptedAppSwitchLocation); | |
topWinTmp.location.href = oShowDesktopUrl.toURL(); | |
} | |
/* This is a js file so Java/JSP cannot be written. Developer should take care of initializing the pega.d.encryptedAppSwitch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment