cancel
Showing results for 
Search instead for 
Did you mean: 

Change JSP HeaderIview of the Masthead

Former Member
0 Kudos

Hi Guru's

I am trying to make a small change in the PAR file com.sap.portal.navigation.masthead. I know all HowTo-guides, but this small change is not described...

The only thing I need is to set an element <BR> (a.k.a. next row in a cell) between "Welcome" and the "Username".

End result should be:

Welcome

John Smith

The code is standard:

<tbody>
		<TR>
	    <TD class="prtlHeaderNotch" id="header_notch" nowrap><img src="<%=themeRootURLPath%>/../common/1x1.gif" class="prtlHeaderNotchImgWidth"></TD>
			<% if (showPortalPlace)
			{%>
			<TD nowrap ti="0" tabIndex="0" class="prtlHdrWelcome" id="welcome_message" title="<%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%>">
				<BR><%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%><BR><%=portalPlaceTitle%></TD>
		<%} else	  
			{%>  
			<TD nowrap ti="0" tabIndex="0" class="prtlHdrWelcome" id="welcome_message" title="<%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%>">
			<BR><%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%></TD>

But where can I make the statement to go to the next row?

Second question:

Where do I have to put a plain text above the links:

For example:

Options:

Contact | Help | Personalize

THANKS IN ADVANCE!

G. Leurs

Accepted Solutions (1)

Accepted Solutions (1)

p330068
Active Contributor
0 Kudos

Hi G. Leurs

I think you need to call this method in StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr)

Inside <% ....%> as Java code and spilt the Welcome and Name part adn put into string field. Now then show/print in html code with page break statement.

Hope it helps

Regards

Arun

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

I am not sure whether the value of "showPortalPlace" is true or not and I am getting the feel that the else portion of this conditional statement is getting called always. Put the same logic in ELSE and please share your finding with us.

Cheers,

AB

Former Member
0 Kudos

Hi,

There was a second mistake in the code

String mastheadEnterTable = getNLSString(componentRequest, MASTHEAD_ENTER_TOOLTIP)

It is corrected now, but as a result I get the same masthead as the standard. So, no two rows

This should be the endresult:

Welcome Options

Username Link1 | Link2 | Link3

Has anyone an idea?

Thanks!

G. Leurs

Former Member
0 Kudos

Hi,

A collegeau of mine mentioned a small "typo"... Allmost at the end of the code closing element </TD>.

But also this was not the key to success.. Any suggestions?

Best regards,

G. Leurs

Former Member
0 Kudos

Hi Guys,

Thanks for your replies, but when I tried to implement the code, it gave an error: Error occurs during the rendering of jsp component. I looked it up in the Default Trace.

Do you have any suggestions for solving this issue?

This is what I implemented:

	<tbody>
		<TR>
	    <TD class="prtlHeaderNotch" id="header_notch" nowrap><img src="<%=themeRootURLPath%>/../common/1x1.gif" class="prtlHeaderNotchImgWidth"></TD>
			<% if (showPortalPlace)
			{%>
			<TD>
			  <TABLE border="0" cellpadding="0" cellspacing="0" >
			    <TR> 
                            <!-- Welcome Message--> 
                               <TD nowrap ti="0" tabIndex="0" class="prtlHdrWelcome" id="welcome_message" title="<%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%>"> 
                               </TD> 
                            </TR> 
                            <TR> 
                            <!-- UserName--> 
    			        <TD> 
                                <%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%><BR><%=portalPlaceTitle%> 
                                </TD> 
                            </TR> 
                          </TABLE> 
                         <TD>
		<%} else	  
			{%>  
			<TD nowrap ti="0" tabIndex="0" class="prtlHdrWelcome" id="welcome_message" title="<%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%>">
			<BR><%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%></TD>
		<%}%>
			<TD class="prtlHdrBrandImgContainer" ti="-1"> <%=GetLicenseText(componentRequest)%></TD>
			<% if (showHelpLink || showPersonalizeLink || showNewWindowLink || ShowLogInLogOffLink || showPortalPlace || ( isAnonymous && ShowDDLAnonymousLanguage) )
		    {%>

Kind regards,

G. Leurs

p330068
Active Contributor
0 Kudos

Hi Leurs,

Have you find anything in Default Trace. check other security.logs also /usr/sap/SID/j2ee/cluster/serverX/log/security.log

Hope it helps

Regards

Arun

Former Member
0 Kudos

Simple: Put a table inside <TD>

Do something like this:

<tbody> 
        <TR> 
            <TD class="prtlHeaderNotch" id="header_notch" nowrap></TD> 
                 <% if (showPortalPlace){%> 
                  <TD> 
                    <TABLE border="0"  cellpadding="0" cellspacing="0" > 
                      <TR> 
                       <!-- Welcome Message--> 
   <TD nowrap ti="0" tabIndex="0" class="prtlHdrWelcome" id="welcome_message" title="<%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%>"> 
                        </TD> 
                     </TR> 
                       <TR> 
                          <!-- UserName--> 
     <TD> 
                               <%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%><BR><%=portalPlaceTitle%> 
                           </TD> 
                         </TR> 
                     </TABLE> 
                  <TD>

But remember, since the function bar "logoff" etc are on the same table row, it will also get affect but this is what you are looking for.