EPCM.getSAPTop().LSAPI is undefined

Hi
I was trying to customize AFP following SAP documents. But after changing the framework page when I logon to portal always I am getting a javascript error.
EPCM.getSAPTop().LSAPI is undefined.
I checked both in IE6 and Mozila and my portal version is EP7.3 SP4.
I have followed all the steps mentioned in the links below.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70bfe58d-1ed9-2d10-42b6-821d62777d6f
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/6032df6e-7625-2e10-418a-ba5c4cb7ead5
Could anyone tell me how to get rid of this js error.
Kind Regards
Kaushik

Hi Kaushik,
Are you using the AFPisLoaded event ? You need to subscribe to this event and put your scripts inside. this event will fire after all AFP have been loaded and are now ready for use.
example:
EPCM.subscribeEventReliable('urn:com.sapportals:navigation', 'AFPisLoaded', function _afpLoaded() { //write your script here });
Best Regards,
Saar

Similar Messages

  • EPCM.getSAPTop().LSAPI.AFPPlugin is null or not an object

    Hello Guys,
    I am doing customization of AJAX Framework Page in Portal 7.3. I have created a copy of default ajax framework modify it and and my custom page and desktop, and add a new entry in the master rule to use the custom ajax framework page but always getting "EPCM.getSAPTop().LSAPI.AFPPlugin is null or not an object" error message everytime i am accessing portal.
    Btw, I am accesing the Portal via IE8 browser - not sure if the issue has something to do with this.
    Your help is highly appreciated.
    Thanks and Regards,
    Robert

    Hi Robert
    Thanks for your reply.
    I tried by adding AFPResource iView in the page, but still getting same js error when the page is getting loaded. Please see the link below for page setting
    [Framework page setting|http://www.freeimagehosting.net/b2bf3].
    Name masthead for the first iview is confusing, ideally this the entire page content which I created following the SAP guides
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70bfe58d-1ed9-2d10-42b6-821d62777d6f
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/6032df6e-7625-2e10-418a-ba5c4cb7ead5
    Any suggestion on this will be highly appreciated.
    Kind Regards
    Sudip

  • LSAPI - getCurrentSelectedPath

    Hi,
    i tried to build a breadcrumb in my own AFP in SAP NetWeaver 7.3
    I use the following code line in a javascript function::
    var pathArray = EPCM.getSAPTop().LSAPI.AFPPlugin.model.getCurrentSelectedPath();
    when i logged in, pathArray is null.
    After i navigate (i navigate with EPCM.getSAPTop().LSAPI.AFPPlugin.service.navigate(...); ) the pathArray is always the last visited navigation point.
    patharray is not the current node it is always the last visited node.
    My question: How can i do my Breadcrumb? Is this a bug or is it my mistake?
    Thanks for any help.

    Hi Sebastian Wörner ,
    I am facing the same problem with the breadCrumb.The breadCrumb is not showing the current path of tree when clicked rather it is showing the path traversed before the click.
    If you have found the solution ,please share it with me.
    Thanks.
    -Dinesh Chandra

  • Error while accessing portal.....

    Hi Experts,
       We have installed EP 7.0 SP 9.  It's working fine, but yesterday we met the problem, we can't able to access portal.
      After giving username and password, its opening the portal homepage with the following JavaScript Error on the taskbar.
    <b>1. 'disable personalize' is undefined
    2. 'EPCM.getSAPTop().gHistoryFrameworkObj' is null or not an object
    3. 'ActiveTrackingEntryIndex' is null or not an object</b>
      After showing errors above, its showing the portal HomePage.  If we click on any roles is loading with busy symbol, we can't able to navigate to any role or any workset after that.
      Please tell me some solution for this, it's very urgent.
      Points will be awarded.
    Regards,
    Chinnadurai.R.

    I also recieved this error.  It took me a while to discover the problem.  It is caused by the order in which .Net is installed.  If when you go to Applicaiton Pools you do NOT see: 
    - ASP.NET v4.0
    - ASP.NET v4.0 Classic
    If you only see
    - Classic .NET AppPool
    - DefaultAppPool
    - MBAMSitesAndSvcsAppPool
    Then you need to re run the setup of .NET using the commands below:
    Type cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\ and press <kbd>ENTER</kbd>.
    Type aspnet_regiis.exe -ir and press <kbd>ENTER</kbd> again.

  • Script Error- inside Collaboration Room

    Hi All,
             I have created Collaboration Room based on SAP Default Room Template its working fine for portal User in this server URL for egs: http://servername:port/irj/portal
    We generated this server URL into the internet URL like this http://www.companyname.com:port/irj/portal
    But Iu2019m getting script error inside the collaboration Room, when we using this internet URL http://www.mycompany.com:port/irj/portal
    Exactly Where Iu2019m getting this script error, Collaboration --> Room --> Room Directory, here I click any of the Rooms, it opens the particular Room in content Area and display some more page link in detailed navigation like has Document and Links, Tasks, Team Members, Search Room, Admin Room, Admin: Member and Room Relations.
    If I click any of page link Iu2019m getting the script error like this  Line: 707 char:5 Error: u2018nullu2019 is null or not an object
    Through Visual Studio I found out that function
    function setFocusOnDtn(){
    var JSTree = SAP_getJSTree("DetailedNavigationTree"); // this JSTree is to be null so this line is probelm
    var roots = JSTree.getSelectedNodes();
        if(roots[0] != null && roots[0]!="undefined" && EPCM.getSAPTop().navPanelStatus == "exp"){
                if(roots[0].getNodeAnchor() != null){
                            if(roots[0].getNodeAnchor().type!='hidden'){
                                 roots[0].getNodeAnchor().focus();
    Help me to achieve this problem........
    Regards
    Thillai J

    Hi,
    I am facing the same problem.
    It says to me "JSTree is null"
    Please let me know if you got any solution for that.
    Thanks

  • Log on problem India: Invalid character

    Dear all,
    we have running a BI 7.0 Portal. We have a guidline how to set up the Internet-Settings (IE 6) for using the portal. It works fine for all our subsituaries, with exeption of India.
    In India, we get the log on screen and we can enter the user name and PW. By confirming this data, we receice the message:
    Line:  2
    Char: 1
    Code: 0
    Error: Invalid character
    Additionaly we receive the following message:
    Line: 1161
    Char: 1
    Error: 'EPCM.getSAPTop().gHistoryFrameworkObj'is null or not an object
    Code: 0
    Do you know how to analyse or solve the problem?
    Thanks!
    XmxhX
    Edited by: XmchX on Mar 19, 2008 8:20 AM

    Hello,  
    See this thread and see whthere its applicable to you,
    Error while accessing portal.....
    Thanks
    Chandran

  • Error with HeaderiView.jsp file

    Hi there,
    I took the masthead par file from the portal and I did some changes in the HeaderiView.jsp. When I try the iview in the preview I see the next error:
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : pcd:portal_content/pruebasjanet/ZiwImage/zprueba54
    Component Name : prueba1701.default
    Error occurs during the rendering of jsp component.
    Exception id: 10:14_06/09/07_0075_33099350
    See the details for the exception ID in the log file
    I already added the com.sap.portal.navigation.mastheadapi.jar in \PORTAL-INF\lib
    and com.sap.portal.navigation.masthead_core.jar \PORTAL-INF\private\lib.
    Any help would be greatly appreciated!
    Jeanette

    Hi Malini,
    Yes, I did some changes in Jsp file. I'm trying to make a copy of the Help Link. I copied all the components in the portalapp.xml (only changes, for example, <property name="ShowHelpLink" value="true">    <property name="ShowSiteLink" value="true">)
    Would you please help me checking the code?
    Thanks.
    Jeanette
    With the jsp file I have problems:
    <%@ page import = "java.util.ResourceBundle" %>
    <%@ page import = "com.sapportals.htmlb.*" %>
    <%@ page import = "com.sapportals.portal.prt.session.IUserContext" %>
    <%@ page import = "com.sapportals.portal.prt.component.*" %>
    <%@ page import = "com.sapportals.portal.prt.service.laf.*" %>
    <%@ page import = "com.sap.security.api.UMFactory" %>
    <%@ page import = "com.sapportals.portal.prt.service.license.ILicenseService"%>
    <%@ page import = "com.sapportals.portal.navigation.*" %>
    <%@ page import = "com.sapportals.portal.prt.runtime.PortalRuntime" %>
    <%@ page import = "com.sapportals.portal.prt.util.StringUtils" %>
    <%@ taglib uri="prt:taglib:tlhtmlb" prefix="hbj" %>
    <%!
    final String PERSONALIZE_PAGE_EVENT_URN = "urn:com.sapportals:navigation";
    final String PERSONALIZE_PAGE_EVENT_NAME = "PersonalizePage";
    final String PERSONALIZE_PAGE_EVENT_PARAMS = "";
    final String PERSONALIZE_PORTAL_EVENT_URN = "urn:com.sapportals:navigation";
    final String PERSONALIZE_PORTAL_EVENT_NAME = "PersonalizePortal";
    final String PERSONALIZE_PORTAL_EVENT_PARAMS = "";
    final String LOGOFF_CONFIRM_MSG_COMPONENT = "logoffConfirmMsg";
    final String LOGON_REDIRECT_COMPONENT = "logInComponent";
    final String LOGOFF_REDIRECT_COMPONENT = "LogOutComponent";
    final String LOGOFF_CONFIRM_MSG_ARGS_IE = "dialogHeight: 170px; dialogWidth: 350px; edge: Raised; center: Yes; help: No; resizable: No; status: No";
    final String LOGOFF_CONFIRM_MSG_ARGS_NS = "Height=170,Width=350";
    final String LOGOFF_CONFIRM_WINDOW_NAME = "LOG_OFF_WINDOW";
    final String HELP_URL = "HelpUrl";
    final String SITE_URL = "SiteUrl";
    final String HELP_WINDOW_NAME = "HELP_WINODW";
    final String SITE_WINDOW_NAME = "SITE_WINODW";
    final String SHOW_PERSONALIZE_LINK = "ShowPersonalizeLink";
    final String SHOW_HELP_LINK = "ShowHelpLink";
    final String SHOW_SITE_LINK = "ShowSiteLink";
    final String SHOW_NEW_WINDOW_LINK = "ShowNewWindowLink";
    final String SHOW_LOG_OFF_LOG_ON_LINK = "ShowLogInLogOffLink";
    //String constants for NLS
    final String WELCOME_CLAUSE = "WELCOME_CLAUSE";
    final String HELP_TEXT = "HELP_TEXT";
    final String SITE_TEXT = "SITE_TEXT";
    final String LOG_OFF_TEXT = "LOG_OFF_TEXT";
    final String LOG_ON_TEXT = "LOG_ON_TEXT";
    final String PERSONALIZE_TEXT = "PERSONALIZE_TEXT";
    final String PERSONALIZE_PORTAL_TEXT = "PERSONALIZE_PORTAL_TEXT";
    final String NEW_WINDOW_TEXT = "NEW_WINDOW_TEXT";
    final String HELP_TOOLTIP = "HELP_TOOLTIP";
    final String SITE_TOOLTIP = "SITE_TOOLTIP";
    final String LOG_OFF_TOOLTIP = "LOG_OFF_TOOLTIP";
    final String LOG_ON_TOOLTIP = "LOG_ON_TOOLTIP";
    final String PERSONALIZE_TOOLTIP = "PERSONALIZE_TEXT";
    final String PERSONALIZE_PORATL_TOOLTIP = "PERSONALIZE_PORATL_TOOLTIP";
    final String NEW_WINDOW_TOOLTIP = "NEW_WINDOW_TOOLTIP";
    final String BEGINNING_OF_PAGE = "BEGINNING_OF_PAGE";
    final String MASTHEAD_ENTER_TOOLTIP = "MASTHEAD_ENTER_TOOLTIP";
    final String MASTHEAD_EXIT_TOOLTIP = "MASTHEAD_EXIT_TOOLTIP";
    final String UNLOAD_MSG = "UNLOAD_MSG";
    private String GetWelcomeMsg(IPortalComponentRequest request, String welcomeClause)
    IUserContext userContext = request.getUser();
    if (userContext != null)
    String firstName = userContext.getFirstName();
    String lastName = userContext.getLastName();
    String salutation = userContext.getSalutation();
    if ((firstName != null) && (lastName != null))
    if(salutation != null)
    return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, salutation}).toString();
    else
    return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
    else
    return java.text.MessageFormat.format(welcomeClause, new Object[] {userContext.getDisplayName()," ", " "}).toString();
    return "";
    private String GetLicenseText(IPortalComponentRequest request){
    ILicenseService license = (ILicenseService)request.getService(ILicenseService.KEY);
    if (license.sapInternalUsageOnly())
    return "<FONT color=orangeRed size=4><STRONG> Licensed For SAP Internal Usage</STRONG></FONT>";
    else
    return " ";
    private boolean getParameter(IPortalComponentRequest request, String param)
    String value = (String)request.getNode().getValue(param);
    return new Boolean(value).booleanValue();
    private String getHelpUrl(IPortalComponentRequest request)
    String value = (String)request.getNode().getValue(HELP_URL);
    return value;
    private String getSiteUrl(IPortalComponentRequest request)
    String value = (String)request.getNode().getValue(SITE_URL);
    return value;
    private String GetLogoffConfirmMsgURL(IPortalComponentRequest request)
    String componentName = request.getComponentContext().getComponentName();
    componentName = componentName.substring(0, componentName.lastIndexOf(".") + 1);
    IPortalComponentURI msgURI = request.createPortalComponentURI();
    msgURI.setContextName(componentName + LOGOFF_CONFIRM_MSG_COMPONENT);
    return msgURI.toString();
    // Attaching the "UnsavedData=true" flag to the Confirm logoff message
    private String GetLogoffConfirmUnsavedMsgURL(IPortalComponentRequest request)
    String basicUrl = GetLogoffConfirmMsgURL(request);
    String separator = (basicUrl.indexOf("?") >=0) ? "&" : "?";
    return basicUrl + separator + "UnsavedData=true";
    private String GetLogoffURL(IPortalComponentRequest request)
    /*IPortalComponentURI logoffURI = request.createPortalComponentURI();
    return logoffURI.toString();*/
    String componentName = request.getComponentContext().getComponentName();
    componentName = componentName.substring(0, componentName.lastIndexOf(".") + 1);
    IPortalComponentURI msgURI = request.createPortalComponentURI();
    msgURI.setContextName(componentName + LOGOFF_REDIRECT_COMPONENT);
    return msgURI.toString();
    private boolean isAccessabilityOn(IPortalComponentRequest request)
    //End: Temporary, till there's a way to set the accessibility for a user
    IUserContext user = request.getUser();
    //if((user.getAccessibilityLevel() != IUserContext.DEFAULT_ACCESSIBILITY_LEVEL) ||(isAccessibility == true) ) // 508 is on
    if (user.getAccessibilityLevel() != IUserContext.DEFAULT_ACCESSIBILITY_LEVEL) // 508 is on
    return true;
    return false;
    private String GetLoginURL(IPortalComponentRequest request)
    INavigationGenerator navigationService = (INavigationGenerator)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
    StringBuffer URL = new StringBuffer(200).append(navigationService.getPortalURL(request , null));
    return URL.append("/login").toString();
    private String GetPortalUrl(IPortalComponentRequest request)
    INavigationGenerator navigationService = (INavigationGenerator)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
    return navigationService.getPortalURL(request , null);
    private String getNLSString(IPortalComponentRequest request, String resource_key)
    try
    ResourceBundle bundle = request.getResourceBundle();
    if(bundle != null)
    return bundle.getString(resource_key);
    return resource_key;
    catch(MissingResourceException e)
    return resource_key;
    private String GetThemeURLPath(IPortalComponentRequest request)
    ILAFService iLAFService = (ILAFService)request.getService(ILAFService.KEY);
    String currentTheme = iLAFService.getCurrentTheme(request).getThemeName();
    String url = iLAFService.getRelativeThemeRootURLPath(request, ILAFService.PORTAL_THEME) + "/" + currentTheme + "/prtl";
    return url;
    //Get the external logoff URL
    private String getExternalLogOffUrl()
    return UMFactory.getProperties().get("ume.logoff.redirect.url");
    //Get the external logoff Mode (silent / not silent)
    private boolean getExternalLogOffMode()
    return UMFactory.getProperties().getBoolean("ume.logoff.redirect.silent" , false);
    private boolean isAnonymous(IPortalComponentRequest request)
    NavigationEventsHelperService helperService = (NavigationEventsHelperService)
    PortalRuntime.getRuntimeResources().getService(NavigationEventsHelperService.KEY);
    return helperService.isAnonymousUser(request);
    %>
    <%
    boolean isPreview = false;
    // initializaing the labels with the localized labels
    String welcomeClauseStr = getNLSString(componentRequest, WELCOME_CLAUSE);
    String helpTextStr = getNLSString(componentRequest, HELP_TEXT);
    String siteTextStr = getNLSString(componentRequest, SITE_TEXT);
    String logOffTextStr = getNLSString(componentRequest, LOG_OFF_TEXT);
    String logInTextStr = getNLSString(componentRequest, LOG_ON_TEXT);
    String personalizeTextStr = getNLSString(componentRequest, PERSONALIZE_TEXT);
    String newWindowTextStr = getNLSString(componentRequest, NEW_WINDOW_TEXT);
    String helpTooltipStr = getNLSString(componentRequest, HELP_TOOLTIP);
    String siteTooltipStr = getNLSString(componentRequest, SITE_TOOLTIP);
    String logOffTooltipStr = getNLSString(componentRequest, LOG_OFF_TOOLTIP);
    String logInTooltipStr = getNLSString(componentRequest, LOG_ON_TOOLTIP);
    String personalizeTooltipStr = getNLSString(componentRequest, PERSONALIZE_TOOLTIP);
    String personalizePortalTooltipStr = getNLSString(componentRequest, PERSONALIZE_PORATL_TOOLTIP);
    String beginningOfPageStr = getNLSString(componentRequest, BEGINNING_OF_PAGE);
    String newWindowStr = getNLSString(componentRequest, NEW_WINDOW_TOOLTIP);
    String mastheadEnterTable = getNLSString(componentRequest, MASTHEAD_ENTER_TOOLTIP);
    String mastheadExitTable = getNLSString(componentRequest, MASTHEAD_EXIT_TOOLTIP);
    String unLoadMsg = getNLSString(componentRequest, UNLOAD_MSG);
    boolean showPersonalizeLink = getParameter(componentRequest, SHOW_PERSONALIZE_LINK);
    boolean showHelpLink = getParameter(componentRequest, SHOW_HELP_LINK);
    boolean showSiteLink = getParameter(componentRequest, SHOW_SITE_LINK);
    boolean showNewWindowLink = getParameter(componentRequest, SHOW_NEW_WINDOW_LINK);
    boolean ShowLogInLogOffLink = getParameter(componentRequest, SHOW_LOG_OFF_LOG_ON_LINK);
    String mode = (String)componentRequest.getNode().getValue("mode");
    if ((mode != null) && (mode.equals("preview")))
    isPreview = true;
    String themeRootURLPath = GetThemeURLPath(componentRequest);
    boolean isAnonymous = isAnonymous(componentRequest);
    boolean isAccessabilityOn = isAccessabilityOn(componentRequest);
    if (isAccessabilityOn)
    helpTooltipStr = helpTextStr", "helpTooltipStr;
    siteTooltipStr = siteTextStr", "siteTooltipStr;
    logOffTooltipStr = logOffTextStr", "logOffTooltipStr;
    logInTooltipStr = logInTextStr", "logInTooltipStr;
    newWindowStr = newWindowTextStr", "newWindowStr;
    personalizePortalTooltipStr = personalizeTextStr", "personalizePortalTooltipStr;
    %>
    <script>
    function openLogoffMsg()
    <%if (!isPreview){%>
    if (EPCM.getUAType() == EPCM.MSIE)
    releaseProducerSessions();
    if(EPCM.getGlobalDirty())
    // unsaved data on the page, display modified dialog
    var val = window.showModalDialog('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');
    if (val == 'logoff')
    disableWorkProtectCheck = true;
    logoff();
    else //no unsaved data
    // data saved, nothing get lost on the page, display normal dialog
    var val = window.showModalDialog('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '', '<%=LOGOFF_CONFIRM_MSG_ARGS_IE%>');
    if (val == 'logoff')
    logoff();
    else
    if(EPCM.getGlobalDirty())
    window.open('<%=GetLogoffConfirmUnsavedMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');
    else
    window.open('<%=GetLogoffConfirmMsgURL(componentRequest)%>', '<%=LOGOFF_CONFIRM_WINDOW_NAME%>', '<%=LOGOFF_CONFIRM_MSG_ARGS_NS%>');
    <%}%>
    var isLogoffFinalAllowed = true;
    var logoffStartTime = (new Date).getTime();
    function logoff()
    EPCM.raiseEvent("urn:com.sapportals.portal:user", "logoff", "");
    logoffStartTime = (new Date).getTime();
    window.setTimeout("logoffDelay()", "50");
    function logoffDelay()
    var isLogoffDelayElapsed = ((new Date).getTime() - logoffStartTime) > (60*1000);
    if(isLogoffFinalAllowed || isLogoffDelayElapsed) {
    logoffFinalCall();
    } else {
    window.setTimeout("logoffDelay()","50");
    function logoffFinalCall()
    logoffThirdParty();
    document.forms["logoffForm"].submit();
    function logIn()
    location.replace("<%=GetLoginURL(componentRequest)%>");
    function runPersonalizePage()
    EPCM.raiseEvent("<%=PERSONALIZE_PAGE_EVENT_URN%>", "<%=PERSONALIZE_PAGE_EVENT_NAME%>", "<%=PERSONALIZE_PAGE_EVENT_PARAMS%>");
    function runPersonalizePortal()
    <%if (!isPreview){%>
    EPCM.raiseEvent("<%=PERSONALIZE_PORTAL_EVENT_URN%>", "<%=PERSONALIZE_PORTAL_EVENT_NAME%>", "<%=PERSONALIZE_PORTAL_EVENT_PARAMS%>");
    <%}%>
    function onPersonalizePortalDisable()
    var linkElem = document.getElementById("personalizePortal");
    var linkSepElem = document.getElementById("personalizePortalSep");
    var linkLogoffSepElem = document.getElementById("logoffsep1");
    if(linkElem != null)
    linkElem.style.display = "none";
    if(linkSepElem != null)
    linkSepElem.style.display = "none";
    if(linkLogoffSepElem != null)
    linkLogoffSepElem.style.display = "none";
    EPCM.subscribeEvent("urn:com.sapportals:navigation", "PersonalizePortalDisable", onPersonalizePortalDisable);
    function openNewPortalWindow()
    <%if (!isPreview){%>
    var navTarget = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue().URL;
    var context = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue().context;
    if (context != null && context.length > 0)
    EPCM.doNavigate(navTarget, 2, null, null, null, null, context);
    else
    EPCM.doNavigate(navTarget, 2);
    <%}%>
    function openHelp()
    <%if (!isPreview){%>
    window.open('<%=getHelpUrl(componentRequest)%>', '<%=HELP_WINDOW_NAME%>');
    <%}%>
    function openSite()
    <%if (!isPreview){%>
    window.open('<%=getSiteUrl(componentRequest)%>', '<%=SITE_WINDOW_NAME%>');
    <%}%>
    function setFocusOnHeader() {
    var melcomeMessage = document.getElementById("welcome_message");
    var headerNotch = document.getElementById("header_notch");
    if(EPCM.getUAType()==EPCM.MOZILLA) {
    // No focus
    } else {
    if(melcomeMessage!=null && melcomeMessage.currentStyle.display!="none") {
    melcomeMessage.focus();
    } else if(headerNotch!=null && headerNotch.currentStyle.display!="none") {
    headerNotch.focus();
    function logoffThirdParty()
    <% if(getExternalLogOffUrl()!= null){ %>
    var logOffUrl = '<%=getExternalLogOffUrl()%>';
    var silent = <%=getExternalLogOffMode()%>;
    if(silent)
    var newIFrame = document.getElementById("externalLogOffIframe");
    if(newIFrame == null)
    newIFrame = document.createElement("IFRAME");
    newIFrame.style.visibility = "hidden";
    newIFrame.width=0;
    newIFrame.height=0;
    newIFrame.id = "externalLogOffIframe";
    newIFrame.src = logOffUrl;
    document.body.appendChild(newIFrame);
    else
    newIFrame.src = "javascript:void(0)";
    newIFrame.src = logOffUrl;
    <% } %>
    </script>
    <hbj:content id="PageContext">
    <hbj:page title="Header Area">
    <hbj:form id="HeaderForm" >
    <!--<a href="#" tabindex=0 title= "<%=beginningOfPageStr%>" accesskey="m">
    <img src="<%=themeRootURLPath%>/../common/1x1.gif" border="0" style="display:none">
    </a>-->
    <% if (isAccessabilityOn)
    {%>
    <TABLE width="100%" border="0" id="myTable" ti="0" tabindex="0" title="<%=mastheadEnterTable%>" onkeydown="nav_skip('myTable',event)" ct="PortalMasthead" cellspacing="0" cellpadding="0" ><% if (isPreview) {%>ondragover="window.event.cancelBubble = true;" ondragleave="window.event.cancelBubble = true;"<%}%>>
    <%} else
    {%>
    <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class="prtlHdrWhl" id="myTable" ti="0" tabindex="0" onkeydown="nav_skip('myTable',event)" ><% if (isPreview) {%>ondragover="window.event.cancelBubble = true;" ondragleave="window.event.cancelBubble = true;"<%}%>>
    <%}%>
    <tbody>
    <TR>
    <TD width="1%" nowrap class="prtlHeaderNotch" id="header_notch"> </TD>
          <TD width="5%" nowrap class="prtlHdrWelcome" id="welcome_message" ti="0" tabIndex="0"><%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%></TD>
    <TD width="3%" nowrap class="prtlHdrWelcome" id="welcome_message" ti="1" tabIndex="1">
    <SCRIPT LANGUAGE="JavaScript">
    var months=new Array(13);
    months[1]="January";
    months[2]="February";
    months[3]="March";
    months[4]="April";
    months[5]="May";
    months[6]="June";
    months[7]="July";
    months[8]="August";
    months[9]="September";
    months[10]="October";
    months[11]="November";
    months[12]="December";
    var time=new Date();
    var lmonth=months[time.getMonth() + 1];
    var date=time.getDate();
    var year=time.getYear();
    if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000))
    year="19" + year;
    if (navigator.appName == "Netscape")
    year=1900 + year;
    document.write("<center>" + lmonth + " ");
    document.write(date + ", " + year + "</center>");
    </SCRIPT>
    </TD>
    <% if (showSiteLink || showHelpLink || showPersonalizeLink || showNewWindowLink || ShowLogInLogOffLink)
    {%>
    <TD width="79%" class="prtlHeaderFunctionsTable">
    <TABLE border="0" cellspacing="0" cellpadding="0"
    class="prtlHeaderFunctionsContainer" height="100%">
    <TR>
    <TD nowrap >
    <!--<hbj:link id="SiteLink" tooltip="<%=siteTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openSite();"><hbj:textView nested="true" text="<%=siteTextStr%>"/></hbj:link> -->
    <hbj:link id="SiteLink" tooltip="<%=siteTooltipStr%>"
    linkDesign="FUNCTION" reference="#">
    <% if (!isPreview) { SiteLink.setOnClientClick("javascript:openSite();");} %>
    <hbj:textView nested="true" text="<%=siteTextStr%>"/>
    </hbj:link>
    </TD>
                <TD nowrap>
                  <%}%>
    <%
    if (showHelpLink)
    { %>
    <TD nowrap >
    <!--<hbj:link id="HelpLink" tooltip="<%=helpTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openHelp();"><hbj:textView nested="true" text="<%=helpTextStr%>"/></hbj:link> -->
    <hbj:link id="HelpLink" tooltip="<%=helpTooltipStr%>"
    linkDesign="FUNCTION" reference="#">
    <% if (!isPreview) { HelpLink.setOnClientClick("javascript:openHelp();");} %>
    <hbj:textView nested="true" text="<%=helpTextStr%>"/>
    </hbj:link>
    </TD>
                <TD nowrap>
                  <%}%>
                  <%
    if (!isAnonymous)
    if (showPersonalizeLink)
    if (showHelpLink)
    { %>
                <TD nowrap id="personalizePortalSep" class="prtlHdrSep"></TD>
    <%} %>
    <TD nowrap id="personalizePortal">
    <hbj:link id="PersonalizeLink"
    tooltip="<%=personalizePortalTooltipStr%>"
    linkDesign="FUNCTION"
    reference="#">
    <% if (!isPreview) {PersonalizeLink.setOnClientClick("javascript:runPersonalizePortal();");}%>
    <hbj:textView nested="true" text="<%=personalizeTextStr%>"/>
    </hbj:link>
    </TD>
    <TD nowrap></TD>
    <%}
    if (showNewWindowLink)
    if (showHelpLink || showPersonalizeLink)
    { %>
    <TD nowrap id="newWindowSep" class="prtlHdrSep"> </TD>
    <%}
    else
    {%>
    <TD nowrap> </TD>
    <%}%>
    <TD nowrap id="newWindow">
    <hbj:link id="newWindowLink" tooltip="<%=newWindowStr%>"
    linkDesign="FUNCTION"
    reference="#">
    <% if (!isPreview) {newWindowLink.setOnClientClick("javascript:openNewPortalWindow();");}%>
    <hbj:textView nested="true" text="<%=newWindowTextStr%>"/>
    </hbj:link>
    </TD>
    <%}%>
    <%}%>
    <TD>
    <%if (ShowLogInLogOffLink)
    {%>
    <TABLE cellspacing="0" cellpadding="0" border="0" class="prtlHeaderFunctionsContainer" height="100%">
    <TR><%
    if (showHelpLink || showPersonalizeLink || showNewWindowLink)
    {%>
    <%
    if(!showHelpLink && !showNewWindowLink)
    {%>
    <TD nowrap id="logoffsep1" class="prtlHdrSep"> </TD>
    <%
    }else
    {%>
    <TD nowrap id="logoffsep2" class="prtlHdrSep"> </TD>
    <%}%>
                      <TD nowrap>
                        <%
    }else
    {%>
                      <TD nowrap >  </TD>
    <%
    if (isAnonymous)
    {%>
                      <TD nowrap>
                        <!<hbj:link id="LoginLink" tooltip="<%=logInTooltipStr%>" linkDesign="FUNCTION" reference="javascript:logIn();"><hbj:textView nested="true" text="<%=logInTextStr%>"/></hbj:link>>
                        <hbj:link id="LoginLink"
    tooltip="<%=logInTooltipStr%>"
    linkDesign="FUNCTION"
    reference="#">
                        <% LoginLink.setOnClientClick("javascript:logIn();"); %>
                        <hbj:textView nested="true" text="<%=logInTextStr%>"/> </hbj:link>
                      </TD>
    <%}
    else
    {%>
                      <TD nowrap>
                        <!<hbj:link id="LogoffLink" tooltip="<%=logOffTooltipStr%>" linkDesign="FUNCTION" reference="javascript:openLogoffMsg();"><hbj:textView nested="true" text="<%=logOffTextStr%>"/></hbj:link>>
                        <hbj:link id="LogoffLink"
    tooltip="<%=logOffTooltipStr%>"
    linkDesign="FUNCTION"
    reference="#">
                        <%if (!isPreview) { LogoffLink.setOnClientClick("javascript:openLogoffMsg();");} %>
                        <hbj:textView nested="true" text="<%=logOffTextStr%>"/> </hbj:link>
                      </TD>
    <%}%>
    </TR>
    </TABLE>
    <%} %>
    </TD>
    </TR>
    </TABLE>
    </TD>
    <%}%>
          <TD width="12%" nowrap class="prtlHdrLogoContainer">
            <% if (isAccessabilityOn)
    {%>
            <%}%>
          </TD>
    </TR>
    </tbody>
    </TABLE>
    </hbj:form>
    </hbj:page>
    </hbj:content>
    <form name="logoffForm" style="display:none;position:absolute;top:-5000;left:-5000" action="<%=GetLogoffURL(componentRequest)%>" method="POST">
      <input type="hidden" name="logout_submit" value="true">
    </form>
    <script>
    <% if (!isPreview) {%>
    if (disablePersonalize) {
    EPCM.raiseEvent("urn:com.sapportals:navigation", "PersonalizePortalDisable", "");
    <%}%>
    setFocusOnHeader();
    EPCM.subscribeEvent("urn:com.sapportals.portal:browser","load",setFocusOnHeader);
    </script>

  • PCD Location of Content-iView

    Hi SDN
    I'd like to get either the full PCD location (like "pcd:portal_content/TEST/TEST_iViews/Footer") or only the last part ("Footer") of the location of the currently displayed iView in the Content Area.
    I need this information in the PageToolBar.
    With JavaScript I can retrieve the navurl and the title of it, but this is where my knowledge ends.
    Any help and hint appreciated (& awarded)
    Regards
    Michael

    I couldn't find anything about the Options->Details-Implementation...
    But this is the JavaScript-Code that solves my problem. I use it in my custom page tool bar (or page title bar). From the Toolbar I call my web dynpro app with parameters, so this works fine for me.
    JavaScript:
    var obj = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue();
    return obj.fullURL;
    Not verified, but could also solve the problem:
    How to do it in plain Java/JSP can be found here:
    https://www.sdn.sap.com/irj/sdn/thread?messageID=307965#307965
    https://www.sdn.sap.com/irj/sdn/thread?messageID=106301#106301
    or with NavigationHelperService (not used very often) in Java :
    https://www.sdn.sap.com/irj/sdn/thread?messageID=5213384#5213384
    Tribute to Praveen! \*bow*

  • Read pageID / iView-Path

    Hi all
    I'd like to make a "Support-Link"-Application which will be started from the PageToolBar.
    When starting this App it should read the pageID of the content currently viewed by the user, something like "pcd:portal_content/TEST/TEST_iViews/Footer".
    How is this done in WD-Java?
    Regards
    Michael

    Not in WD, but in the page that calls my WD-App:
    JavaScript:
    var obj = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue();
    return obj.fullURL;
    in Java (not tested, but found after I knew how it works (as always ;( )):
    https://www.sdn.sap.com/irj/sdn/thread?messageID=307965#307965
    https://www.sdn.sap.com/irj/sdn/thread?messageID=106301#106301
    https://www.sdn.sap.com/irj/sdn/thread?messageID=5213384#5213384
    Thanks to Praveen. You're great!

  • Help with Detail Navigation Node Landing Page

    Hi, When a user clicks on a Detail Navigation Node I have a landing page that says "Welcome to the <Text> Report Area>.  I have a different page for each DTN node so right now I'm maintaining quite a few landing pages.
    I'd like to have 1 dynamic page that says welcome to "Node Text".  Where the Node Text is the text of the detail navigation node they selected. 
    Does anyone know if this is possible to pull off?
    Thanks, Ken Murray

    Below is what your HTML should look like.
    <div id='welcomemessage'></div>
    <scripta>
    document.getElementById('welcomemessage') innerhtml = 'Welcome to'  + EPCM.getSAPTop().document.title;
    </scripta>
    Replace the scripta with script above, since if I put the script out there this forum throws some exception.
    Also add a . and remove the space before innerhtml because even doing so the forum is throwing error. SAP needs to get there act together at least on forum and not blindly filter certain characters.

  • Work Protect Mode on WebTemplates

    Hi folks,
    I'd like to use the Work Protect Mode using set_dirty method, but i didn't find help or instructions to implement it in a WebApplicationDesigner (WAD) WebTemplate correctly.
    E.g. i will get the errors EPCM or WDPortalWorkProtectMode is undefined if i implement it using JavaScript.
    Is there any help outside?

    Okay, other question: How do i get access to object EPCM using JavaScript?

  • How to modify com.sap.portal.navigation.pagetoolbar.par

    Hi Experts,
               I have to create a link on the Page Toolbar(Next to "History") by the name "Add Favorites" which has the same functionality as that of the "Add to Portal Favorites" button present in the Option Menu in sap portal.
    I have imported the com.sap.portal.navigation.pagetoolbar.par in to my nwds , but i am not sure if this is the correct par.
    please tell me where exactly the modification needs to be done.
    Thanks in advance .
    Regards
    Shivas

    Hi,
    the PAR you are looking for is: com.sap.portal.pageToolbar
    As for the code: copy & paste the standard SAP code. For adding the page to the portal favorites:
    AddToPortalFavorites(). The code looks like:
    function AddToPortalFavorites(target , title, mode)
         try
              var obj = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue();
              var context = obj.context;
              if(! target)
                   target = obj.getUrl();
                   title = GetUnescapedTitle(obj.title);
              var url = "/irj/servlet/prt/portal/prtroot/com.sap.km.cm.remote?ServiceType=PortalFavorites&";
              url += ("NavigationTarget=" + escape(target));
              url += ("&Title=" + encodeURIComponent(title));
    -> the JS with this code is located ar:
    /irj/portalapps/com.sap.portal.navigation.helperservice/scripts/FrameworkSupport.js
    To add the page to the browser's favorites:
    pageTitleBar.AddToFavorites("location")
    br,
    Tobias

  • Back & Forward Functionality

    Hello,
    We have a requirement of implementing Portal's Back and Forward functionality in our customized masthead iview.
    We understand this needs use of certain EPCM methods (EPCM.getSAPTop().gHistoryFrameworkObj.GetTrackingListPreActive() & EPCM.getSAPTop().gHistoryFrameworkObj.GetTrackingListPostActive() ) methods.
    The problem here is when we use EPCM.getSAPTop().gHistoryFrameworkObj.GetTrackingListPreActive() to get an array list of pages of history, this function is not returning any value to our defined variable.
    Please help me, if anyone has done this kind of customization.
    Also, if there is a better approach of implementing back and forward functionality in our custom defined framework pages, please let me know.
    Thanks in advance
    Srinidhi

    Has anyone actually seen this effect? Anyone? Thoughts?

  • Error:EPCM is Undefined

    Hi All,
    While logging to portal we are getting an error in logon page named "EPCM is Undefined".
    Can any one suggest a solution for this..??
    Regards,
    Vinoth

    Hi,
    Pls see this
    "'EPCM' is undefined"  error while logging onto EP
    aneez

  • EPCM is undefined

    Hello,
    after Login to the SAP Netweaver Portal I receive at the following page the script-error "EPCM is undefined". I don't get the full navigation because of this script-error.
    This problem is only at one PC, at all other it works fine. All settings are same to other PCs.
    Please help me.
    Regards
    Philipp

    Hi Philipp
    Did you find a solution? I have a similar problem - the portal (EP7 SP13) works fine for most users, but one user gets javascript errors (EPCM is undefined, object required) and cannot display most of the portal screen. He has the same IE version (IE6 SP2) and settings (default "Low" in security zones) as other users. I have added *.js to NeverCompress and restarted, but still it does not work for him.
    Any ideas?
    Many thanks & regards
    Jane

Maybe you are looking for

  • URGENT: Form Import FAILED with  Unable to generate UI form: ORA-0650

    I am importing application components from one installation of portal 3.0.9.8 to another installation. Both installed versions of POrtal are the same. The application name is PROFILE_APP. I have created this same app with same specifications as in so

  • PSE 8.0 Mac Won't Install

    Running Snow Leopard on iMac. I insert the disk and it shows up in finder but the install routine never runs. I have tried this several times and have even rebooted the machine. AFAICT there is no way to run the installer manuyally. How do I get this

  • Pc to mac transfer ........ almost there -please HELP me complete!

    Successfully have moved all music, artwork, vids, podcasts from PC to MAC... moved the iTunes files across, and my playlists are present, but in name only..the associated music to playlist didn't connect.... Two different questions.. 1) do I need to

  • Ipad disabled with ios 8

    my iPad updated and not its disabled???? After updating to ios 8 ... put in my normal password and nothing!!! ... My children gave me the iPad and im not computer savvy!!!! ... so it was never connected to a computer or / iTunes account! I'm lost wit

  • How do I download and start using Premiere?

    How do I downlod and start using Premiere?