Customizing Portal Log off confirmation box
Unlike the log off URL we don’t have any UME parameter for customizing log off confirmation box.(Fig 1)
This blog explains to maintain a custom UME parameter in order to handle the log off confirmation box.
Step 1 :
Download the com.sap.portal.navigation.masthead.par.bak file from
Step 4 : Modify the HeaderiView.jsp
I have created a new method getLogoffConfirmationBox() just below getExternalLogOfUrl() method
Now call the getLogoffConfirmationBox() method in the script(as shown below) and code the condition
If ‘True’ the confirmation box will be shown else the logoff() function is directly called.
Step 5 :
Export the par file and deploy in portal.
Step 6 :
Go to User Management Configuration -> Direct Editing and add the line as in Fig 1.
Step 7 :
Restart portal
+
Advantages : +
1) Now the Logoff confirmation box is part of the Portal Administration than development.
one time upload the par file and switch on/off the confirmation box.
2) This is just a hint of using the UME properties. we can use this for our custom JSP pages also.
For those who use external log off link (SSO accross applications). They might want to change the log out(confirmation) text.
Are these special jar files? If yes, where can I find them?
I am on EP 6.0 SP12 and I could only find the com.sap.portal.navigation.masthead_core.jar in the J2EE engine. The API jar is missing. Am I looking in the wrong place? Greatly appreciate any help.
Thanks.
The supporting jars will be part of com.sap.portal.navigation.masthead.par.bak. but when you explode in NWDS it might not join in the lib folders. so you might want to manually add those files.
-D
I'm not getting the com.sap.portal.navigation.mastheadapi.jar file.
So when is execute the par file, am getting "Portal Runtime Error".
Where to get this api.jar file.? I download the com.sap.portal.navigation.masthead.par.bak file from the server. But it contains only com.sap.portal.navigation.masthead_core.jar file and not the com.sap.portal.navigation.mastheadapi.jar file
download the com.sap.portal.navigation.masthead.par.bak file from your server and explode it , you can find the API jar file inside PORTAL-INF/lib/.
-D
Error in executing a process for compilation, D:/usr/sap/EPDA/j2ee/j2ee_00/cluster/server/services/servlet_jsp/work/jspTemp/irj/root/WEB-INF/portal/portalapps/com.sap.portal.navigation.masthead/work/jsp/_sapportalsjsp_HeaderiView.java:1537: 'catch' without 'try' } catch (ThreadDeath tde) { throw tde; ^
D:/usr/sap/EPDA/j2ee/j2ee_00/cluster/server/services/servlet_jsp/work/jspTemp/irj/root/WEB-INF/portal/portalapps/com.sap.portal.navigation.masthead/work/jsp/_sapportalsjsp_HeaderiView.java:219: 'try' without 'catch' or 'finally' try { ^
D:/usr/sap/EPDA/j2ee/j2ee_00/cluster/server/services/servlet_jsp/work/jspTemp/irj/root/WEB-INF/portal/portalapps/com.sap.portal.navigation.masthead/work/jsp/_sapportalsjsp_HeaderiView.java:1549: '}' expected }
^ 3 errors .
Exception id: 01:56_30/08/06_0008
See the details for the exception ID in the log file
Any ideas???
Hi Jose,<br/>This looks like a syntax error. kindly check the code.<br/>function openLogoffMsg()<br/>{<br/><%if (!isPreview){%><br/><br/> if (EPCM.getUAType() == EPCM.MSIE)<br/> {<br/> var confirmationBox = '<%=getLogoffConfirmationBox()%>';<br/> <br/> if(confirmationBox == 'true'){<br/><br/> var val = window.showModalDialog('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');<br/> if (val == 'logoff')<br/> logoff(); <br/> }else{logoff()};<br/> <br/> <br/> }<br/> else<br/> {<br/> if(confirmationBox == 'true'){<br/> window.open('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');<br/> logoff();<br/> }else {logoff()};<br/> }<br/> <br/><%}%><br/>}
Here is the code based on NW7. I didn't want to change the original code structure... So anyone that wants to simplify the code is welcome to post it.<br/><br/>function openLogoffMsg()<br/>{<br/><%if (!isPreview){%><br/> if (EPCM.getUAType() == EPCM.MSIE)<br/> {<br/> var confirmationBox = '<%=getLogoffConfirmationBox()%>';<br/> <br/> if(EPCM.getGlobalDirty())<br/> {<br/> if (confirmationBox == 'true'){<br/> // unsaved data on the page, display modified dialog<br/> var val = window.showModalDialog('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');<br/> if (val == 'logoff')<br/> {<br/> disableWorkProtectCheck = true;<br/> logoff();<br/> }<br/> }else{<br/> disableWorkProtectCheck = true;<br/> logoff();<br/> }<br/> }<br/> else //no unsaved data<br/> {<br/> if (confirmationBox == 'true'){<br/> // data saved, nothing get lost on the page, display normal dialog<br/> var val = window.showModalDialog('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');<br/> if (val == 'logoff')<br/> logoff();<br/> }else{<br/> logoff();<br/> }<br/> } <br/> }<br/> else<br/> {<br/> if (confirmationBox == 'true'){<br/> if(EPCM.getGlobalDirty())<br/> {<br/> window.open('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');<br/> }<br/> else<br/> {<br/> window.open('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');<br/> }<br/> }else{<br/> logoff();<br/> }<br/> }<br/><%}%><br/>}