I´ve been working over the EPCM.subscribeEvent I´ve included all the raised events collected from the javascripts. The completed code looks like this:
//Subscribe the events from portal
//Events raised by browser
script+="//EPCM.subscribeEvent('urn:com.sapportals.portal:bro wser', '*',onGetEvent);\n";
//events raised by load or reload the page
script+="EPCM.subscribeEvent( 'urn:com.sapportals.portal:pageBuilder', '*', onGetEvent );\n";
// events raised by actions inside Desktop navigate between tabs
script+="EPCM.subscribeEvent( 'urn:com.sapportals:navigation', '*', onGetEvent );\n";
// events raised by the user actions
script+="EPCM.subscribeEvent( 'urn:com.sapportals.portal:user', ''*'', onGetEvent );\n";
script+="</script>\n";
//Events for CRM
script+="<SCRIPT src='\irj\servlet_jsp\irj\root\portalapps\com.sap. portal.epcf.loader\support\epcfproxy.js'></SCRIPT>";
//In Documentation it looks like:: script+="<SCRIPT src='epcfproxy.js'></SCRIPT>";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals:navigation', '*', Navigate);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals:navigation', '*', RefreshWorkArea);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals:navigation', '*', PersonalizeWorkArea);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals:navigation', '*', ExpandWorkArea);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals:navigation', '*', HelpWorkArea);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals:navigation', '*', RelativeNavigate);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals:navigation', '*', ObjBasedNavigate);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals:navigation', '*', RefreshPage);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals.portal:workprotect', '*', inquiryProtection);\n";
script+="EPCMPROXY.subscribeEvent( 'urn:com.sapportals.portal.dsm:Notification', '*', ReceiveSessInfoKey);\n";
The added lines are the ones included in after "//Events for CRM".
There´s an error returned when including epcfproxy.js. The error is only returned when includding all the path. Error says Invalid escape sequence( valid ones \b t\ n\ f\ r\ "\ '\ \\)
Regards,
James