Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

pxSessionTimer for timeout does not display in modal window

SA-44678

Summary



Modal dialog window does not display after implementing the pxSessionTimer for timeout. The out-of-the-box Alert box displays instead.

Expected:



Actual:




Error Messages



Not Applicable


Steps to Reproduce



Configure the pxSessionTimer for timeout.


Root Cause



The window.showModalDialog() was causing the issue.


Resolution



Perform the following local-change to replace the window.showModalDialog() with pega.openUrlInModal.showModalDialog(): Replace the block of code with the below code (replace the functions and not the entire code) in the pxSessionTimer section:

function desktop_restartTimeoutWarningTimer(){
if (pega.desktop.TimeoutTime && pega.desktop.TimeoutTime > 0) {
/* Calculate the time to initial warning in milliseconds*/
var nTimeoutWarningTime= (pega.desktop.TimeoutTime - pega.desktop.TimeoutWarningWindow) * 60000;

/* Clear the existing countdown */
clearTimeout(pega.desktop.TimeoutWarningCountdown);
if (nTimeoutWarningTime >= 0) {
pega.desktop.TimeoutWarningCountdown = self.setTimeout("desktop_showTimeoutWarningCUSTOM('"+pega.d.TimeoutWarningWindow +"')",nTimeoutWarningTime);
} }
}
function desktop_showTimeoutWarningCUSTOM(strTime) {
var iTime = parseInt(strTime);
iTime = iTime * 60000;
var oSafeURL = new SafeURL("@baseclass.ShowLogoffTimer");
oSafeURL.put("time",iTime);

pega.openUrlInModal.showModalDialog(oSafeURL,iTime, 210, 620, function(ret){
if (ret == null || ret == "ok") {
desktop_restartTimeoutWarningTimer();
} else {
pega.u.d.gDirtyOverride = false;
try {
closeAllPRPCChildWindows();
application.logOff(true);
} catch(e) {
pega.u.d.replace('pyActivity=LogOff&pzPrimaryPageName=pyDisplayHarness', null);
}
}
});
self.setTimeout(function(){clearTimeout(pega.desktop.TimeoutWarningCountdown);}, 5000);
}

function closeAllPRPCChildWindows()
{
var currWin = null;
var app = pega.desktop.support.getDesktopApplication();

while (null != (curWin = app.openedWindows.pop())) {
curWin.close();
}
}



Published February 16, 2018 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice