Question & Answer
Question
How do you suppress the popup requesting users to stay on or leave the page when trying to close the page in IBM Sterling Store Web?
Cause
Clicking Back button in POS tries to close the browser and due to this popup, POS gets stuck.
Answer
To achieve this, override the out of box provided Container.jsp file present within <WSC_WAR_ROOT>/wsc/desktop/container/ directory. In this file there's one setReloadConfirmationPopupMode method which sets the popup mode to ALWAYS.
Change this to NEVER using the below code as reference -
scUtil.setReloadConfirmationPopupMode("NEVER");
To override Container.jsp file, follow the below approach -
- Copy the Container.jsp file from <INSTALL_DIR>\repository\eardata\wsc\war\wsc\desktop\container and place it inside <INSTALL_DIR>\repository\eardata\wsc\extn\wsc\desktop\container.
- Edit this Container.jsp file at this new location to change the reloadConfirmationPopupMode to NEVER.
- Rebuild the ear/war as applicable and deploy.
NOTE: While copying the Container.jsp file under extn folder as described in step 1 above, copy all other files present under <INSTALL_DIR>\repository\eardata\wsc\war\wsc\desktop\container, which the Container.jsp is referring to.
For example - appConfig.json is referred, so make sure to copy this file as well under extn folder.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg22006862